dont be detected by friendly detectors
This commit is contained in:
@@ -104,10 +104,14 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
public bool IsVisible(Actor self)
|
public bool IsVisible(Actor self)
|
||||||
{
|
{
|
||||||
if (!Cloaked || self.Owner == self.World.LocalPlayer || self.World.LocalPlayer == null || self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally)
|
if (!Cloaked || self.Owner == self.World.LocalPlayer ||
|
||||||
return true;
|
self.World.LocalPlayer == null ||
|
||||||
|
self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally)
|
||||||
return self.World.Queries.WithTrait<DetectCloaked>().Any(a => (self.Location - a.Actor.Location).Length < a.Actor.Info.Traits.Get<DetectCloakedInfo>().Range);
|
return true;
|
||||||
|
|
||||||
|
return self.World.Queries.WithTrait<DetectCloaked>().Any(a =>
|
||||||
|
a.Actor.Owner.Stances[self.Owner] != Stance.Ally &&
|
||||||
|
(self.Location - a.Actor.Location).Length < a.Actor.Info.Traits.Get<DetectCloakedInfo>().Range);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color RadarColorOverride(Actor self)
|
public Color RadarColorOverride(Actor self)
|
||||||
|
|||||||
Reference in New Issue
Block a user