Fix AI attacking

This commit is contained in:
Paul Chote
2010-08-27 11:46:54 +12:00
parent 88dfbe657c
commit 7f3e491ecc

View File

@@ -180,11 +180,10 @@ namespace OpenRA.Mods.RA
attackForce.RemoveAll(a => a.Destroyed); attackForce.RemoveAll(a => a.Destroyed);
activeProductionBuildings.RemoveAll(a => a.Destroyed); activeProductionBuildings.RemoveAll(a => a.Destroyed);
//don't select harvesters. // don't select harvesters.
var newUnits = self.World.Queries.OwnedBy[p] var newUnits = self.World.Queries.OwnedBy[p]
.Where(a => (a.Info.Traits.Contains<IMove>() .Where(a => a.HasTrait<IMove>() && a.Info != Rules.Info["harv"]
&& a.Info != Rules.Info["harv"] && !activeUnits.Contains(a)).ToArray();
&& !activeUnits.Contains(a))).ToArray();
foreach (var a in newUnits) foreach (var a in newUnits)
{ {