Ground units: Avoid stepping onto dangerous/deep floor

This commit is contained in:
Anuken
2021-01-17 09:21:11 -05:00
parent 02ef633529
commit f9adcfeed1
2 changed files with 6 additions and 1 deletions

View File

@@ -292,7 +292,7 @@ public class Pathfinder implements Runnable{
}
}
if(current == null || tl == impassable) return tile;
if(current == null || tl == impassable || (path.cost == costTypes.items[costGround] && current.dangerous() && !tile.dangerous())) return tile;
return current;
}