diff options
| author | Simon 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) |
| commit | 8d312ecdfadb7c68d00caf01effe0c1e0a45cb76 (patch) | |
| tree | 4c9f891c6fb3d4a7cdf58339139dc1359e85b528 /src/simulation/elements | |
| parent | 9b5b85f9b01cbda7ef9a7ec2a15b2a35630a5b9d (diff) | |
| parent | f7dd658a301bf22802b72f0d338c6a769e28ed0a (diff) | |
| download | powder-8d312ecdfadb7c68d00caf01effe0c1e0a45cb76.zip powder-8d312ecdfadb7c68d00caf01effe0c1e0a45cb76.tar.gz | |
Merge branch 'master' of github.com:FacialTurd/The-Powder-Toy
Diffstat (limited to 'src/simulation/elements')
| -rw-r--r-- | src/simulation/elements/CRAY.cpp | 4 | ||||
| -rw-r--r-- | src/simulation/elements/SPRK.cpp | 2 |
2 files changed, 3 insertions, 3 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() {} diff --git a/src/simulation/elements/SPRK.cpp b/src/simulation/elements/SPRK.cpp index 8122385..d441455 100644 --- a/src/simulation/elements/SPRK.cpp +++ b/src/simulation/elements/SPRK.cpp @@ -254,7 +254,7 @@ int Element_SPRK::update(UPDATE_FUNC_ARGS) case PT_SWCH: if (receiver==PT_PSCN||receiver==PT_NSCN||receiver==PT_WATR||receiver==PT_SLTW||receiver==PT_NTCT||receiver==PT_PTCT||receiver==PT_INWR) continue; - goto conduct; + break; case PT_ETRD: if (receiver==PT_METL||receiver==PT_BMTL||receiver==PT_BRMT||receiver==PT_LRBD||receiver==PT_RBDM||receiver==PT_PSCN||receiver==PT_NSCN) goto conduct; |
