summaryrefslogtreecommitdiff
path: root/src/simulation
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
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')
-rw-r--r--src/simulation/Simulation.cpp1
-rw-r--r--src/simulation/elements/CRAY.cpp4
-rw-r--r--src/simulation/elements/SPRK.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index bec937f..7e076ad 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -2116,6 +2116,7 @@ void Simulation::init_can_move()
can_move[PT_ELEC][PT_BIZRG] = 2;
can_move[PT_PHOT][PT_BIZRS] = 2;
can_move[PT_ELEC][PT_BIZRS] = 2;
+ can_move[PT_NEUT][PT_INVIS] = 2;
//whol eats anar
can_move[PT_ANAR][PT_WHOL] = 1;
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;