allow marking things with AutoTargetIgnore so AutoTarget won't go for them
This commit is contained in:
@@ -216,6 +216,7 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
return inRange
|
return inRange
|
||||||
.Where(a => a.Owner != null && self.Owner.Stances[a.Owner] == Stance.Enemy)
|
.Where(a => a.Owner != null && self.Owner.Stances[a.Owner] == Stance.Enemy)
|
||||||
|
.Where(a => !a.HasTrait<AutoTargetIgnore>())
|
||||||
.Where(a => HasAnyValidWeapons(Target.FromActor(a)))
|
.Where(a => HasAnyValidWeapons(Target.FromActor(a)))
|
||||||
.OrderBy(a => (a.CenterLocation - self.CenterLocation).LengthSquared)
|
.OrderBy(a => (a.CenterLocation - self.CenterLocation).LengthSquared)
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user