Possible wave AI pathfinding fix
This commit is contained in:
@@ -4232,7 +4232,7 @@ public class Blocks{
|
|||||||
scaledHealth = 180;
|
scaledHealth = 180;
|
||||||
rotateSpeed = 1.5f;
|
rotateSpeed = 1.5f;
|
||||||
researchCostMultiplier = 0.05f;
|
researchCostMultiplier = 0.05f;
|
||||||
buildTime = 60f * 12.5f;
|
buildTime = 60f * 9f;
|
||||||
|
|
||||||
coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f));
|
coolant = consume(new ConsumeLiquid(Liquids.water, 15f / 60f));
|
||||||
limitRange(12f);
|
limitRange(12f);
|
||||||
|
|||||||
@@ -137,7 +137,9 @@ public class AIController implements UnitController{
|
|||||||
|
|
||||||
if((tile == targetTile && stopAtTargetTile) || !unit.canPass(targetTile.x, targetTile.y)) return;
|
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){
|
public Vec2 alterPathfind(Vec2 vec){
|
||||||
|
|||||||
Reference in New Issue
Block a user