diff options
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; |
