fixed #983 -- don't crash in HackyAI if we can't find a target.
This commit is contained in:
@@ -283,13 +283,13 @@ namespace OpenRA.Mods.RA
|
|||||||
attackTarget = ChooseEnemyTarget();
|
attackTarget = ChooseEnemyTarget();
|
||||||
if (attackTarget == null)
|
if (attackTarget == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
foreach (var a in unitsHangingAroundTheBase)
|
||||||
|
if (TryToMove(a, attackTarget.Value, true))
|
||||||
|
attackForce.Add(a);
|
||||||
|
|
||||||
|
unitsHangingAroundTheBase.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var a in unitsHangingAroundTheBase)
|
|
||||||
if (TryToMove(a, attackTarget.Value, true))
|
|
||||||
attackForce.Add(a);
|
|
||||||
|
|
||||||
unitsHangingAroundTheBase.Clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we have any attackers, let them scan for enemy units and stop and regroup if they spot any
|
// If we have any attackers, let them scan for enemy units and stop and regroup if they spot any
|
||||||
|
|||||||
Reference in New Issue
Block a user