diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index a1b879289..ea8e4d200 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -568,10 +568,6 @@ public abstract class Char extends Actor { pos = step; - if (flying && Dungeon.level.map[pos] == Terrain.DOOR) { - Door.enter( pos ); - } - if (this != Dungeon.hero) { sprite.visible = Dungeon.level.heroFOV[pos]; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java index ac2a86064..37c769f03 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java @@ -102,9 +102,7 @@ public class Swarm extends Mob { clone.pos = Random.element( candidates ); clone.state = clone.HUNTING; - if (Dungeon.level.map[clone.pos] == Terrain.DOOR) { - Door.enter( clone.pos ); - } + Dungeon.level.occupyCell(clone); GameScene.add( clone, SPLIT_DELAY ); Actor.addDelayed( new Pushing( clone, pos, clone.pos ), -1 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java index e4b16a347..21e2d6dbc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -797,6 +797,10 @@ public abstract class Level implements Bundlable { //characters which are not the hero or a sheep 'soft' press cells pressCell( ch.pos, ch instanceof Hero || ch instanceof Sheep); + } else { + if (map[ch.pos] == Terrain.DOOR){ + Door.enter( ch.pos ); + } } }