From 6234f53e2cd2a8f353cd56651bdd9fd01d4a2c9a Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 26 Aug 2010 20:12:29 +1200 Subject: [PATCH] hack around the buggy AI. --- OpenRA.Mods.RA/HackyAI.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OpenRA.Mods.RA/HackyAI.cs b/OpenRA.Mods.RA/HackyAI.cs index 9e5bd6b0bd..5ea0ff2313 100644 --- a/OpenRA.Mods.RA/HackyAI.cs +++ b/OpenRA.Mods.RA/HackyAI.cs @@ -175,6 +175,13 @@ namespace OpenRA.Mods.RA private void AssignRolesToIdleUnits(Actor self) { + //HACK: trim these lists -- we really shouldn't be hanging onto all this state + //when it's invalidated so easily, but that's Matthew/Alli's problem. + activeUnits.RemoveAll(a => a.Destroyed); + unitsHangingAroundTheBase.RemoveAll(a => a.Destroyed); + attackForce.RemoveAll(a => a.Destroyed); + activeProductionBuildings.RemoveAll(a => a.Destroyed); + //don't select harvesters. var newUnits = self.World.Queries.OwnedBy[p] .Where(a => ((a.Info.Category == "Infantry" || a.Info.Category == "Vehicle")