Block solids from being created in detect wall in IsWallBlocking instead, fixes #881
This commit is contained in:
parent
74adc9e4b2
commit
299781bf13
@ -2328,6 +2328,8 @@ bool Simulation::IsWallBlocking(int x, int y, int type)
|
||||
return true;
|
||||
else if (wall == WL_EWALL && !emap[y/CELL][x/CELL])
|
||||
return true;
|
||||
else if (wall == WL_DETECT && (elements[type].Properties&TYPE_SOLID))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -3225,8 +3227,6 @@ int Simulation::create_part(int p, int x, int y, int t, int v)
|
||||
}
|
||||
else if (IsWallBlocking(x, y, t))
|
||||
return -1;
|
||||
else if (bmap[y/CELL][x/CELL]==WL_DETECT && elements[t].Properties & TYPE_SOLID)
|
||||
return -1;
|
||||
else if (photons[y][x] && (elements[t].Properties & TYPE_ENERGY))
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user