DetectCloaked: actor should be in world
This commit is contained in:
@@ -261,8 +261,8 @@ 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)
|
||||
&& Info.DetectionTypes.Overlaps(a.Trait.Info.DetectionTypes)
|
||||
return self.World.ActorsWithTrait<DetectCloaked>().Any(a => a.Actor.IsInWorld
|
||||
&& a.Actor.Owner.IsAlliedWith(viewer) && Info.DetectionTypes.Overlaps(a.Trait.Info.DetectionTypes)
|
||||
&& (self.CenterPosition - a.Actor.CenterPosition).LengthSquared <= a.Trait.Range.LengthSquared);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user