Improved avoidance
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user