fixed #983 -- don't crash in HackyAI if we can't find a target.

This commit is contained in:
Chris Forbes
2011-07-08 22:13:24 +12:00
committed by Paul Chote
parent 14de16eeba
commit 6f2d1c54d6

View File

@@ -283,7 +283,6 @@ namespace OpenRA.Mods.RA
attackTarget = ChooseEnemyTarget();
if (attackTarget == null)
return;
}
foreach (var a in unitsHangingAroundTheBase)
if (TryToMove(a, attackTarget.Value, true))
@@ -291,6 +290,7 @@ namespace OpenRA.Mods.RA
unitsHangingAroundTheBase.Clear();
}
}
// If we have any attackers, let them scan for enemy units and stop and regroup if they spot any
if (attackForce.Count > 0)