diff --git a/core/src/mindustry/ai/RtsAI.java b/core/src/mindustry/ai/RtsAI.java index 97368ffd65..61e5d81e03 100644 --- a/core/src/mindustry/ai/RtsAI.java +++ b/core/src/mindustry/ai/RtsAI.java @@ -224,7 +224,7 @@ public class RtsAI{ unit.command().commandPosition(defendPos); }else{ //TODO stopAtTarget parameter could be false, could be tweaked - unit.command().commandTarget(defendTarget == null ? build : defendTarget, true); + unit.command().commandTarget(defendTarget == null ? build : defendTarget, defendTarget != null); } } } diff --git a/core/src/mindustry/ai/types/CommandAI.java b/core/src/mindustry/ai/types/CommandAI.java index a9e2c2ac7c..216370ae82 100644 --- a/core/src/mindustry/ai/types/CommandAI.java +++ b/core/src/mindustry/ai/types/CommandAI.java @@ -82,7 +82,7 @@ public class CommandAI extends AIController{ attackTarget != null && unit.within(attackTarget, engageRange) ? engageRange : unit.isGrounded() ? 0f : attackTarget != null ? engageRange : - 0f, 100f, false, null); + 0f, unit.isFlying() ? 40f : 100f, false, null); //calculateFlock().limit(unit.speed() * flockMult) }