summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-03-25 15:36:04 (GMT)
committer jacob1 <jfu614@gmail.com>2013-03-25 15:36:04 (GMT)
commit010f7790ebc72baf1fa3c99dfaeb8b69cdd3a0cb (patch)
treef3d2a7d6db550ac471a4558c5432dddadaf0e415 /src
parent9ef7a4c1a523e485c501d64644bfba9c1d7f3bb5 (diff)
downloadpowder-010f7790ebc72baf1fa3c99dfaeb8b69cdd3a0cb.zip
powder-010f7790ebc72baf1fa3c99dfaeb8b69cdd3a0cb.tar.gz
Fix CRAY bug that deletes particle 0
Diffstat (limited to 'src')
-rw-r--r--src/simulation/elements/CRAY.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp
index 38c3b9f..3cba72a 100644
--- a/src/simulation/elements/CRAY.cpp
+++ b/src/simulation/elements/CRAY.cpp
@@ -105,7 +105,7 @@ int Element_CRAY::update(UPDATE_FUNC_ARGS)
colored = wavelengthToDecoColour(parts[r>>8].ctype);
} else if ((r&0xFF) == PT_CRAY || nostop) {
docontinue = 1;
- } else if(destroy && ((r&0xFF) != PT_DMND)) {
+ } else if(destroy && r && ((r&0xFF) != PT_DMND)) {
sim->kill_part(r>>8);
if(!--partsRemaining)
docontinue = 0;
@@ -147,4 +147,4 @@ unsigned int Element_CRAY::wavelengthToDecoColour(int wavelength)
}
-Element_CRAY::~Element_CRAY() {} \ No newline at end of file
+Element_CRAY::~Element_CRAY() {}