v0.6.2: fixed fly swarms not duplicating over terrain hazards
This commit is contained in:
parent
495a3cdb4b
commit
02508571c6
|
@ -86,11 +86,11 @@ public class Swarm extends Mob {
|
|||
|
||||
if (HP >= damage + 2) {
|
||||
ArrayList<Integer> candidates = new ArrayList<>();
|
||||
boolean[] passable = Dungeon.level.passable;
|
||||
boolean[] solid = Dungeon.level.solid;
|
||||
|
||||
int[] neighbours = {pos + 1, pos - 1, pos + Dungeon.level.width(), pos - Dungeon.level.width()};
|
||||
for (int n : neighbours) {
|
||||
if (passable[n] && Actor.findChar( n ) == null) {
|
||||
if (!solid[n] && Actor.findChar( n ) == null) {
|
||||
candidates.add( n );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user