stop neut from dragging particles inside energy walls, fixes jacob#18

This commit is contained in:
mniip 2014-01-30 22:55:55 +04:00
parent 250b522221
commit 1266307070

View File

@ -2345,6 +2345,8 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny)
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(bmap[y/CELL][x/CELL] == WL_ALLOWENERGY)
return 1; // do not drag target particle into an energy only wall
if (s)
{
pmap[ny][nx] = (s&~(0xFF))|parts[s>>8].type;