From 6bb031b47f569892f07a9c4446be0c4434e4c4f6 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 7 Apr 2025 00:26:47 -0400 Subject: [PATCH] Possible wave AI pathfinding fix --- core/src/mindustry/content/Blocks.java | 2 +- core/src/mindustry/entities/units/AIController.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 6d21810b88..c068c3f7d6 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -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); diff --git a/core/src/mindustry/entities/units/AIController.java b/core/src/mindustry/entities/units/AIController.java index 47d3611755..50d130c1e8 100644 --- a/core/src/mindustry/entities/units/AIController.java +++ b/core/src/mindustry/entities/units/AIController.java @@ -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){