Fixed wave naval pathfinding for solid blocks
This commit is contained in:
@@ -69,7 +69,7 @@ public class Pathfinder implements Runnable{
|
|||||||
|
|
||||||
//water
|
//water
|
||||||
(team, tile) ->
|
(team, tile) ->
|
||||||
(!PathTile.liquid(tile) ? 6000 : 1) +
|
(!PathTile.liquid(tile) || PathTile.solid(tile) ? 6000 : 1) +
|
||||||
PathTile.health(tile) * 5 +
|
PathTile.health(tile) * 5 +
|
||||||
(PathTile.nearGround(tile) || PathTile.nearSolid(tile) ? 14 : 0) +
|
(PathTile.nearGround(tile) || PathTile.nearSolid(tile) ? 14 : 0) +
|
||||||
(PathTile.deep(tile) ? 0 : 1) +
|
(PathTile.deep(tile) ? 0 : 1) +
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
|||||||
return y * tilesize;
|
return y * tilesize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: this method is misleading and buggy for non-center tiles
|
||||||
public float drawx(){
|
public float drawx(){
|
||||||
return block().offset + worldx();
|
return block().offset + worldx();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user