summaryrefslogtreecommitdiff
path: root/src/simulation/elements/CRAY.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2013-04-07 11:46:09 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2013-04-07 11:46:09 (GMT)
commit8d312ecdfadb7c68d00caf01effe0c1e0a45cb76 (patch)
tree4c9f891c6fb3d4a7cdf58339139dc1359e85b528 /src/simulation/elements/CRAY.cpp
parent9b5b85f9b01cbda7ef9a7ec2a15b2a35630a5b9d (diff)
parentf7dd658a301bf22802b72f0d338c6a769e28ed0a (diff)
downloadpowder-8d312ecdfadb7c68d00caf01effe0c1e0a45cb76.zip
powder-8d312ecdfadb7c68d00caf01effe0c1e0a45cb76.tar.gz
Merge branch 'master' of github.com:FacialTurd/The-Powder-Toy
Diffstat (limited to 'src/simulation/elements/CRAY.cpp')
-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() {}