diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp index 112dd498c..3088f7a3f 100644 --- a/src/simulation/elements/CRAY.cpp +++ b/src/simulation/elements/CRAY.cpp @@ -65,6 +65,7 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS) if ((r&0xFF)!=PT_CRAY && (r&0xFF)!=PT_PSCN && (r&0xFF)!=PT_INST && (r&0xFF)!=PT_METL && (r&0xFF)!=PT_SPRK && (r&0xFF)>8].temp; } } } else if (parts[i].life==0) { // only fire when life is 0, but nothing sets the life right now @@ -96,14 +97,20 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS) if (nr!=-1) { parts[nr].dcolour = colored; } + if((!destroy || parts[i].ctype != PT_SPRK) && !--partsRemaining) + docontinue = 0; } else if ((r&0xFF)==PT_FILT) { // get color if passed through FILT colored = wavelengthToDecoColour(parts[r>>8].ctype); + } else if ((r&0xFF) == PT_CRAY || nostop) { + docontinue = 1; } else if(destroy && ((r&0xFF) != PT_DMND)) { sim->kill_part(r>>8); - } else if ((r&0xFF) != PT_CRAY && !nostop) { - docontinue = 0; + if(!--partsRemaining) + docontinue = 0; } - if(!--partsRemaining) + else + docontinue = 0; + if(!partsRemaining) docontinue = 0; } }