summaryrefslogtreecommitdiff
path: root/src/simulation/elements/CRAY.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/CRAY.cpp')
-rw-r--r--src/simulation/elements/CRAY.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp
index 112dd49..3088f7a 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)<PT_NUM)
{
parts[i].ctype = r&0xFF;
+ //parts[i].temp = parts[r>>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;
}
}