fix some rare SWCH problems

This commit is contained in:
Cracker64
2011-01-12 19:11:46 -05:00
parent 1c8df0f09e
commit 225dab24ea

View File

@@ -3843,7 +3843,7 @@ void update_particles_i(pixel *vid, int start, int inc)
parts[i].life = 10;
}
}
else if(parts[r>>8].type == PT_SPRK && parts[r>>8].ctype==PT_SWCH && parts[i].life<10&&parts_avg(i,r>>8,PT_INSL)!=PT_INSL)
else if(parts[r>>8].type == PT_SPRK && parts[r>>8].ctype==PT_SWCH && parts[i].life<10 && parts[i].life>0 &&parts_avg(i,r>>8,PT_INSL)!=PT_INSL)
{
parts[r>>8].type = parts[r>>8].ctype;
parts[r>>8].life = 9;