Fixed #2651: Units not in world should not be added to the attack force

Otherwise, a pillbox's e1 passenger is counted as part of the attack
force and ends up jamming HackyAI's attack logic until it is destroyed.
This commit is contained in:
Chris Forbes
2013-02-05 07:09:05 +13:00
parent b3fbafad59
commit 6403c5e6af

View File

@@ -281,7 +281,7 @@ namespace OpenRA.Mods.RA.AI
var newUnits = self.World.ActorsWithTrait<IMove>()
.Where(a => a.Actor.Owner == p && !a.Actor.HasTrait<BaseBuilding>()
&& !activeUnits.Contains(a.Actor))
&& !activeUnits.Contains(a.Actor) && a.Actor.IsInWorld)
.Select(a => a.Actor).ToArray();
foreach (var a in newUnits)