"Hugging" fix for RTS AI

This commit is contained in:
Anuken 2022-04-24 14:11:21 -04:00
parent 03a469e56f
commit abdb1c1252
2 changed files with 2 additions and 2 deletions

View file

@ -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);
}
}
}

View file

@ -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)
}