From 9033786e4936ffcdf91011c1a02af4d48d253ebb Mon Sep 17 00:00:00 2001 From: Simon Robertshaw <simon@hardwired.org.uk> Date: Tue, 12 Jun 2012 20:15:33 +0100 Subject: [PATCH] TPT: Fix PROP_NEUTPENETRATE, particles weren't being moved into empty space --- src/simulation/Simulation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index acc667156..c4e6fbb83 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)