Preload naval paths on liquid spawns

This commit is contained in:
Anuken
2020-12-30 19:35:23 -05:00
parent f5410c5712
commit 727b47dba5
4 changed files with 11 additions and 6 deletions

View File

@@ -88,7 +88,7 @@ public class AIController implements UnitController{
if(tile == null) return;
Tile targetTile = pathfinder.getTargetTile(tile, pathfinder.getField(unit.team, costType, pathTarget));
if(tile == targetTile || (costType == Pathfinder.costWater && !targetTile.floor().isLiquid)) return;
if(tile == targetTile || (costType == Pathfinder.costNaval && !targetTile.floor().isLiquid)) return;
unit.moveAt(vec.trns(unit.angleTo(targetTile), unit.speed()));
}