mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-02 22:47:26 +02:00
PROT with 0 life doesn't die
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user