Fix slight particle order issue with SWCH

This commit is contained in:
jacksonmj 2012-12-04 19:38:01 +00:00
parent 2a8811190c
commit 9bf5eeeef9

View File

@ -76,7 +76,7 @@ int Element_SWCH::update(UPDATE_FUNC_ARGS)
parts[i].life = parts[r>>8].life;
}
}
else if (rt==PT_SPRK&&parts[i].life==10&&parts[r>>8].ctype!=PT_PSCN&&parts[r>>8].ctype!=PT_NSCN) {
else if (rt==PT_SPRK && parts[i].life==10 && parts[r>>8].life>0 && parts[r>>8].ctype!=PT_PSCN && parts[r>>8].ctype!=PT_NSCN) {
sim->part_change_type(i,x,y,PT_SPRK);
parts[i].ctype = PT_SWCH;
parts[i].life = 4;