mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-09-02 20:42:36 +02:00
stop neut from dragging particles inside energy walls, fixes jacob#18
This commit is contained in:
@@ -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))
|
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
|
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 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)
|
if (s)
|
||||||
{
|
{
|
||||||
pmap[ny][nx] = (s&~(0xFF))|parts[s>>8].type;
|
pmap[ny][nx] = (s&~(0xFF))|parts[s>>8].type;
|
||||||
|
Reference in New Issue
Block a user