v0.3.0d: enforced removing traps when setting terrain to a none-trap tile.
This commit is contained in:
parent
88a55f3336
commit
b7db57f665
|
@ -635,6 +635,10 @@ public abstract class Level implements Bundlable {
|
||||||
public static void set( int cell, int terrain ) {
|
public static void set( int cell, int terrain ) {
|
||||||
Painter.set( Dungeon.level, cell, terrain );
|
Painter.set( Dungeon.level, cell, terrain );
|
||||||
|
|
||||||
|
if (terrain != Terrain.TRAP && terrain != Terrain.SECRET_TRAP){
|
||||||
|
Dungeon.level.traps.remove( cell );
|
||||||
|
}
|
||||||
|
|
||||||
int flags = Terrain.flags[terrain];
|
int flags = Terrain.flags[terrain];
|
||||||
passable[cell] = (flags & Terrain.PASSABLE) != 0;
|
passable[cell] = (flags & Terrain.PASSABLE) != 0;
|
||||||
losBlocking[cell] = (flags & Terrain.LOS_BLOCKING) != 0;
|
losBlocking[cell] = (flags & Terrain.LOS_BLOCKING) != 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user