diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp index 3999f1f2a..7b56a0987 100644 --- a/src/simulation/elements/CRAY.cpp +++ b/src/simulation/elements/CRAY.cpp @@ -98,9 +98,9 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS) if (nr!=-1) { parts[nr].dcolour = colored; parts[nr].temp = parts[i].temp; + if(!--partsRemaining) + docontinue = 0; } - if(!--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) {