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:
RoosterDragon
2016-08-12 18:08:58 +01:00
parent da3333073f
commit cc4ef736b0

View File

@@ -659,21 +659,20 @@ namespace OpenRA.Mods.Common.AI
s.Update();
}
if (--assignRolesTicks > 0)
return;
if (--assignRolesTicks <= 0)
{
assignRolesTicks = Info.AssignRolesInterval;
GiveOrdersToIdleHarvesters();
FindNewUnits(self);
FindAndDeployBackupMcv(self);
}
if (--minAttackForceDelayTicks <= 0)
{
minAttackForceDelayTicks = Info.MinimumAttackForceDelay;
CreateAttackForce();
}
FindAndDeployBackupMcv(self);
if (--minCaptureDelayTicks <= 0)
{
minCaptureDelayTicks = Info.MinimumCaptureDelay;