PROT with 0 life doesn't die
This commit is contained in:
parent
d1e75c7a50
commit
c4dcb37de4
@ -31,7 +31,7 @@ Element_PROT::Element_PROT()
|
|||||||
Description = "Protons. Transfer heat to materials, and removes sparks.";
|
Description = "Protons. Transfer heat to materials, and removes sparks.";
|
||||||
|
|
||||||
State = ST_GAS;
|
State = ST_GAS;
|
||||||
Properties = TYPE_ENERGY|PROP_LIFE_KILL;
|
Properties = TYPE_ENERGY;
|
||||||
|
|
||||||
LowPressure = IPL;
|
LowPressure = IPL;
|
||||||
LowPressureTransition = NT;
|
LowPressureTransition = NT;
|
||||||
@ -107,8 +107,11 @@ int Element_PROT::update(UPDATE_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//else, slowly kill it if it's not inside an element
|
//else, slowly kill it if it's not inside an element
|
||||||
else
|
else if (parts[i].life)
|
||||||
parts[i].life--;
|
{
|
||||||
|
if (!--parts[i].life)
|
||||||
|
sim->kill_part(i);
|
||||||
|
}
|
||||||
|
|
||||||
//if this proton has collided with another last frame, change it into a heavier element
|
//if this proton has collided with another last frame, change it into a heavier element
|
||||||
if (parts[i].tmp)
|
if (parts[i].tmp)
|
||||||
|
Loading…
Reference in New Issue
Block a user