"Hugging" fix for RTS AI
This commit is contained in:
@@ -224,7 +224,7 @@ public class RtsAI{
|
|||||||
unit.command().commandPosition(defendPos);
|
unit.command().commandPosition(defendPos);
|
||||||
}else{
|
}else{
|
||||||
//TODO stopAtTarget parameter could be false, could be tweaked
|
//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 :
|
attackTarget != null && unit.within(attackTarget, engageRange) ? engageRange :
|
||||||
unit.isGrounded() ? 0f :
|
unit.isGrounded() ? 0f :
|
||||||
attackTarget != null ? engageRange :
|
attackTarget != null ? engageRange :
|
||||||
0f, 100f, false, null);
|
0f, unit.isFlying() ? 40f : 100f, false, null);
|
||||||
|
|
||||||
//calculateFlock().limit(unit.speed() * flockMult)
|
//calculateFlock().limit(unit.speed() * flockMult)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user