summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2012-05-30 21:05:16 (GMT)
committer jacksonmj <mj-pt@jacksonmj.co.uk>2012-05-30 21:07:57 (GMT)
commit10e553be0393bbeb7692168d935b2d42507cfdfd (patch)
tree3600063e7ba13088eba952d3447b868fcff0826d /src
parent033a010143634524281b360342d02f25352e1bc4 (diff)
downloadpowder-10e553be0393bbeb7692168d935b2d42507cfdfd.zip
powder-10e553be0393bbeb7692168d935b2d42507cfdfd.tar.gz
Fix PROP_NEUTPENETRATE, particles weren't being moved into empty space
Diffstat (limited to 'src')
-rw-r--r--src/powder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/powder.c b/src/powder.c
index 7f797d0..aabea34 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -384,7 +384,7 @@ int 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 (!(ptypes[s&0xFF].properties&PROP_NEUTPENETRATE))
+ if (s && !(ptypes[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)