Ensure HackyAI tries to attack and capture as frequently as it should.
Returning early in AssignRolesToIdleUnits would skip ticking down the counters that trigger new attack and capture attempts. This means they would be attempted far less often than intended.
This commit is contained in:
@@ -659,21 +659,20 @@ namespace OpenRA.Mods.Common.AI
|
|||||||
s.Update();
|
s.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (--assignRolesTicks > 0)
|
if (--assignRolesTicks <= 0)
|
||||||
return;
|
{
|
||||||
|
assignRolesTicks = Info.AssignRolesInterval;
|
||||||
|
GiveOrdersToIdleHarvesters();
|
||||||
|
FindNewUnits(self);
|
||||||
|
FindAndDeployBackupMcv(self);
|
||||||
|
}
|
||||||
|
|
||||||
assignRolesTicks = Info.AssignRolesInterval;
|
|
||||||
|
|
||||||
GiveOrdersToIdleHarvesters();
|
|
||||||
FindNewUnits(self);
|
|
||||||
if (--minAttackForceDelayTicks <= 0)
|
if (--minAttackForceDelayTicks <= 0)
|
||||||
{
|
{
|
||||||
minAttackForceDelayTicks = Info.MinimumAttackForceDelay;
|
minAttackForceDelayTicks = Info.MinimumAttackForceDelay;
|
||||||
CreateAttackForce();
|
CreateAttackForce();
|
||||||
}
|
}
|
||||||
|
|
||||||
FindAndDeployBackupMcv(self);
|
|
||||||
|
|
||||||
if (--minCaptureDelayTicks <= 0)
|
if (--minCaptureDelayTicks <= 0)
|
||||||
{
|
{
|
||||||
minCaptureDelayTicks = Info.MinimumCaptureDelay;
|
minCaptureDelayTicks = Info.MinimumCaptureDelay;
|
||||||
|
|||||||
Reference in New Issue
Block a user