Improved avoidance

This commit is contained in:
Anuken
2019-03-30 12:33:01 -04:00
parent eb3d5b62f5
commit 83bde8a781
3 changed files with 6 additions and 6 deletions
@@ -65,7 +65,7 @@ public class Pathfinder{
Tile other = world.tile(dx, dy);
if(other == null) continue;
if(values[dx][dy] < value && (target == null || values[dx][dy] < tl) &&
if(values[dx][dy] < value && (target == null || values[dx][dy]< tl) &&
!other.solid() &&
!(point.x != 0 && point.y != 0 && (world.solid(tile.x + point.x, tile.y) || world.solid(tile.x, tile.y + point.y)))){ //diagonal corner trap
target = other;