mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
"Hugging" fix for RTS AI
This commit is contained in:
parent
03a469e56f
commit
abdb1c1252
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue