v3.2.5: fixed guards pulling large chargs into enclosed spaces

This commit is contained in:
Evan Debenham
2025-09-18 13:19:59 -04:00
parent efb58becba
commit c471924d58

View File

@@ -80,7 +80,9 @@ public class Guard extends Mob {
else {
int newPos = -1;
for (int i : chain.subPath(1, chain.dist)){
if (!Dungeon.level.solid[i] && Actor.findChar(i) == null){
//find the closest position to the guard that's open for the target
if (!Dungeon.level.solid[i] && Actor.findChar(i) == null
&& (Dungeon.level.openSpace[i] || !Char.hasProp(enemy, Property.LARGE))){
newPos = i;
break;
}