fix bug where when sparks were reset, ctype wasn't

This commit is contained in:
jacob1 2013-08-29 22:44:38 -04:00
parent 2cbee180a1
commit fd586d167f
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);