Fix crash with LIGH

This commit is contained in:
Simon Robertshaw 2011-10-10 23:58:50 +01:00
parent a87407f0df
commit 40457bf652

View File

@ -68,6 +68,8 @@ int update_SPRK(UPDATE_FUNC_ARGS) {
int p=create_part(-1, x+rx*2, y+ry*2, PT_LIGH);
if (p!=-1)
{
if(!parts[i].tmp) //Prevent Arithmetic errors with zero values
continue;
parts[p].life=rand()%(2+parts[i].tmp/15)+4+parts[i].tmp/7;
if (parts[i].life>60)
parts[i].life=60;