From fd586d167f8c3d1e38af36d47e7b048b61c983ce Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 29 Aug 2013 22:44:38 -0400 Subject: [PATCH] fix bug where when sparks were reset, ctype wasn't --- src/cat/LegacyLuaAPI.cpp | 2 +- src/gui/game/GameController.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cat/LegacyLuaAPI.cpp b/src/cat/LegacyLuaAPI.cpp index 293d45ef9..9c32ad59f 100644 --- a/src/cat/LegacyLuaAPI.cpp +++ b/src/cat/LegacyLuaAPI.cpp @@ -1100,7 +1100,7 @@ int luatpt_reset_spark(lua_State* l) if (luacon_sim->parts[i].ctype >= 0 && luacon_sim->parts[i].ctype < PT_NUM) { luacon_sim->parts[i].type = luacon_sim->parts[i].ctype; - luacon_sim->parts[i].life = 0; + luacon_sim->parts[i].life = luacon_sim->parts[i].ctype = 0; } else luacon_sim->kill_part(i); diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp index b6d056029..12358480f 100644 --- a/src/gui/game/GameController.cpp +++ b/src/gui/game/GameController.cpp @@ -749,7 +749,7 @@ void GameController::ResetSpark() if (sim->parts[i].ctype >= 0 && sim->parts[i].ctype < PT_NUM && sim->elements[sim->parts[i].ctype].Enabled) { sim->parts[i].type = sim->parts[i].ctype; - sim->parts[i].life = 0; + sim->parts[i].ctype = sim->parts[i].life = 0; } else sim->kill_part(i);