Update src/simulation/elements/VIBR.cpp

fix EXOT destroying exploding VIBR
This commit is contained in:
jacob1
2012-11-23 21:28:10 -05:00
parent da554cfef2
commit 6a4040f2b7

View File

@@ -149,7 +149,7 @@ int Element_VIBR::update(UPDATE_FUNC_ARGS) {
if (!r) if (!r)
continue; continue;
//Melts into EXOT //Melts into EXOT
if ((r&0xFF) == PT_EXOT && !(rand()%250)) if ((r&0xFF) == PT_EXOT && !(rand()%250) && !parts[i].life)
{ {
sim->create_part(i, x, y, PT_EXOT); sim->create_part(i, x, y, PT_EXOT);
} }
@@ -163,7 +163,7 @@ int Element_VIBR::update(UPDATE_FUNC_ARGS) {
parts[r>>8].tmp += 10; parts[r>>8].tmp += 10;
} }
//Absorbs energy particles //Absorbs energy particles
if ((sim->elements[r&0xFF].Properties & TYPE_ENERGY)) if ((sim->elements[r&0xFF].Properties & TYPE_ENERGY) && !parts[i].life)
{ {
parts[i].tmp += 20; parts[i].tmp += 20;
sim->kill_part(r>>8); sim->kill_part(r>>8);