mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-06 08:57:45 +07:00
Patrol tweaks
This commit is contained in:
parent
f63837fa4b
commit
cafec1386c
@ -213,6 +213,11 @@ public class CommandAI extends AIController{
|
||||
boolean move = true;
|
||||
vecOut.set(targetPos);
|
||||
|
||||
//TODO: should the unit stop when it finds a target?
|
||||
if(stance == UnitStance.patrol && target != null && unit.within(target, unit.type.range - 2f)){
|
||||
move = false;
|
||||
}
|
||||
|
||||
if(unit.isGrounded() && stance != UnitStance.ram){
|
||||
move = Vars.controlPath.getPathPosition(unit, pathId, targetPos, vecOut, noFound);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user