Add upgrade support to DetectCloaked.
This commit is contained in:
@@ -123,7 +123,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!Cloaked || self.Owner.IsAlliedWith(viewer))
|
||||
return true;
|
||||
|
||||
return self.World.ActorsWithTrait<DetectCloaked>().Any(a => a.Actor.Owner.IsAlliedWith(viewer)
|
||||
return self.World.ActorsWithTrait<DetectCloaked>().Any(a => !a.Trait.IsTraitDisabled && a.Actor.Owner.IsAlliedWith(viewer)
|
||||
&& Info.CloakTypes.Intersect(a.Trait.Info.CloakTypes).Any()
|
||||
&& (self.CenterPosition - a.Actor.CenterPosition).Length <= WRange.FromCells(a.Trait.Info.Range).Range);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user