Fixed wave naval pathfinding for solid blocks

This commit is contained in:
Anuken
2025-04-30 14:29:38 -04:00
parent 6d99e40fe4
commit f5f2951d26
2 changed files with 2 additions and 1 deletions

View File

@@ -69,7 +69,7 @@ public class Pathfinder implements Runnable{
//water
(team, tile) ->
(!PathTile.liquid(tile) ? 6000 : 1) +
(!PathTile.liquid(tile) || PathTile.solid(tile) ? 6000 : 1) +
PathTile.health(tile) * 5 +
(PathTile.nearGround(tile) || PathTile.nearSolid(tile) ? 14 : 0) +
(PathTile.deep(tile) ? 0 : 1) +

View File

@@ -156,6 +156,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
return y * tilesize;
}
//TODO: this method is misleading and buggy for non-center tiles
public float drawx(){
return block().offset + worldx();
}