allow marking things with AutoTargetIgnore so AutoTarget won't go for them

This commit is contained in:
Chris Forbes
2010-12-05 11:39:44 +13:00
parent 4d0535daa9
commit a752c47b5a

View File

@@ -216,6 +216,7 @@ namespace OpenRA.Mods.RA
return inRange
.Where(a => a.Owner != null && self.Owner.Stances[a.Owner] == Stance.Enemy)
.Where(a => !a.HasTrait<AutoTargetIgnore>())
.Where(a => HasAnyValidWeapons(Target.FromActor(a)))
.OrderBy(a => (a.CenterLocation - self.CenterLocation).LengthSquared)
.FirstOrDefault();