v0.7.5b: fixed flying enemies not opening doors in some cases
This commit is contained in:
parent
2105802d89
commit
cb59d5d629
|
@ -568,10 +568,6 @@ public abstract class Char extends Actor {
|
||||||
|
|
||||||
pos = step;
|
pos = step;
|
||||||
|
|
||||||
if (flying && Dungeon.level.map[pos] == Terrain.DOOR) {
|
|
||||||
Door.enter( pos );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this != Dungeon.hero) {
|
if (this != Dungeon.hero) {
|
||||||
sprite.visible = Dungeon.level.heroFOV[pos];
|
sprite.visible = Dungeon.level.heroFOV[pos];
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,9 +102,7 @@ public class Swarm extends Mob {
|
||||||
clone.pos = Random.element( candidates );
|
clone.pos = Random.element( candidates );
|
||||||
clone.state = clone.HUNTING;
|
clone.state = clone.HUNTING;
|
||||||
|
|
||||||
if (Dungeon.level.map[clone.pos] == Terrain.DOOR) {
|
Dungeon.level.occupyCell(clone);
|
||||||
Door.enter( clone.pos );
|
|
||||||
}
|
|
||||||
|
|
||||||
GameScene.add( clone, SPLIT_DELAY );
|
GameScene.add( clone, SPLIT_DELAY );
|
||||||
Actor.addDelayed( new Pushing( clone, pos, clone.pos ), -1 );
|
Actor.addDelayed( new Pushing( clone, pos, clone.pos ), -1 );
|
||||||
|
|
|
@ -797,6 +797,10 @@ public abstract class Level implements Bundlable {
|
||||||
|
|
||||||
//characters which are not the hero or a sheep 'soft' press cells
|
//characters which are not the hero or a sheep 'soft' press cells
|
||||||
pressCell( ch.pos, ch instanceof Hero || ch instanceof Sheep);
|
pressCell( ch.pos, ch instanceof Hero || ch instanceof Sheep);
|
||||||
|
} else {
|
||||||
|
if (map[ch.pos] == Terrain.DOOR){
|
||||||
|
Door.enter( ch.pos );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user