summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-08-30 02:44:38 (GMT)
committer jacob1 <jfu614@gmail.com>2013-08-30 02:44:38 (GMT)
commitfd586d167f8c3d1e38af36d47e7b048b61c983ce (patch)
tree5279b55cdbe5a3ba0e5894b07822b9323b3f62c0
parent2cbee180a1e8e8fd08d9ecca82c86d8f689d1fc6 (diff)
downloadpowder-fd586d167f8c3d1e38af36d47e7b048b61c983ce.zip
powder-fd586d167f8c3d1e38af36d47e7b048b61c983ce.tar.gz
fix bug where when sparks were reset, ctype wasn't
-rw-r--r--src/cat/LegacyLuaAPI.cpp2
-rw-r--r--src/gui/game/GameController.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cat/LegacyLuaAPI.cpp b/src/cat/LegacyLuaAPI.cpp
index 293d45e..9c32ad5 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 b6d0560..1235848 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);