v2.2.0: fixed findstep also including avoid cells in all cases

This commit is contained in:
Evan Debenham
2023-09-28 15:58:09 -04:00
parent 51cfd6eb45
commit 04a56c5cea

View File

@@ -1009,7 +1009,7 @@ public class Dungeon {
public static int findStep(Char ch, int to, boolean[] pass, boolean[] visible, boolean chars ) {
if (Dungeon.level.adjacent( ch.pos, to )) {
return Actor.findChar( to ) == null && (pass[to] || Dungeon.level.avoid[to]) ? to : -1;
return Actor.findChar( to ) == null && pass[to] ? to : -1;
}
return PathFinder.getStep( ch.pos, to, findPassable(ch, pass, visible, chars) );