Possible wave AI pathfinding fix

This commit is contained in:
Anuken
2025-04-07 00:26:47 -04:00
parent fb3a6b526a
commit 6bb031b47f
2 changed files with 4 additions and 2 deletions

View File

@@ -4232,7 +4232,7 @@ public class Blocks{
scaledHealth = 180;
rotateSpeed = 1.5f;
researchCostMultiplier = 0.05f;
buildTime = 60f * 12.5f;
buildTime = 60f * 9f;
coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f));
limitRange(12f);

View File

@@ -137,7 +137,9 @@ public class AIController implements UnitController{
if((tile == targetTile && stopAtTargetTile) || !unit.canPass(targetTile.x, targetTile.y)) return;
unit.movePref(alterPathfind(vec.set(targetTile.worldx(), targetTile.worldy()).sub(tile.worldx(), tile.worldy()).setLength(prefSpeed())));
//TODO: this may be buggy, figure out if it's the cause of the issue
//unit.movePref(alterPathfind(vec.set(targetTile.worldx(), targetTile.worldy()).sub(tile.worldx(), tile.worldy()).setLength(prefSpeed())));
unit.movePref(vec.trns(unit.angleTo(targetTile.worldx(), targetTile.worldy()), prefSpeed()));
}
public Vec2 alterPathfind(Vec2 vec){