summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-06-12 19:15:33 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-06-12 19:15:33 (GMT)
commit9033786e4936ffcdf91011c1a02af4d48d253ebb (patch)
tree3f1462a292fc72f339e6c121b9817f55e21605ab /src/simulation/Simulation.cpp
parentc0008efb745584d2a1a0a4de0d03bcf477b2fcdd (diff)
downloadpowder-9033786e4936ffcdf91011c1a02af4d48d253ebb.zip
powder-9033786e4936ffcdf91011c1a02af4d48d253ebb.tar.gz
TPT: Fix PROP_NEUTPENETRATE, particles weren't being moved into empty space
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index acc6671..c4e6fbb 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -2016,7 +2016,7 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny)
if (parts[i].type==PT_NEUT) {
// target material is NEUTPENETRATE, meaning it gets moved around when neutron passes
unsigned s = pmap[y][x];
- if (!(elements[s&0xFF].Properties&PROP_NEUTPENETRATE))
+ if (s && !(elements[s&0xFF].Properties&PROP_NEUTPENETRATE))
return 1; // if the element currently underneath neutron isn't NEUTPENETRATE, don't move anything except the neutron
// if nothing is currently underneath neutron, only move target particle
if (s)