From 7f3e491ecc068cda90a6f8898a9f82d74d385734 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 27 Aug 2010 11:46:54 +1200 Subject: [PATCH] Fix AI attacking --- OpenRA.Mods.RA/HackyAI.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.RA/HackyAI.cs b/OpenRA.Mods.RA/HackyAI.cs index 0ed905c696..8894379321 100644 --- a/OpenRA.Mods.RA/HackyAI.cs +++ b/OpenRA.Mods.RA/HackyAI.cs @@ -180,11 +180,10 @@ namespace OpenRA.Mods.RA attackForce.RemoveAll(a => a.Destroyed); activeProductionBuildings.RemoveAll(a => a.Destroyed); - //don't select harvesters. + // don't select harvesters. var newUnits = self.World.Queries.OwnedBy[p] - .Where(a => (a.Info.Traits.Contains() - && a.Info != Rules.Info["harv"] - && !activeUnits.Contains(a))).ToArray(); + .Where(a => a.HasTrait() && a.Info != Rules.Info["harv"] + && !activeUnits.Contains(a)).ToArray(); foreach (var a in newUnits) {