Implement DetectCloakedMultiplier.

This commit is contained in:
Mustafa Alperen Seki
2019-06-17 23:31:15 +03:00
committed by reaperrr
parent d36973138c
commit 3e39ada304
5 changed files with 63 additions and 5 deletions

View File

@@ -197,9 +197,9 @@ namespace OpenRA.Mods.Common.Traits
if (!Cloaked || self.Owner.IsAlliedWith(viewer))
return true;
return self.World.ActorsWithTrait<DetectCloaked>().Any(a => !a.Trait.IsTraitDisabled && a.Actor.Owner.IsAlliedWith(viewer)
return self.World.ActorsWithTrait<DetectCloaked>().Any(a => a.Actor.Owner.IsAlliedWith(viewer)
&& Info.CloakTypes.Overlaps(a.Trait.Info.CloakTypes)
&& (self.CenterPosition - a.Actor.CenterPosition).LengthSquared <= a.Trait.Info.Range.LengthSquared);
&& (self.CenterPosition - a.Actor.CenterPosition).LengthSquared <= a.Trait.Range.LengthSquared);
}
Color IRadarColorModifier.RadarColorOverride(Actor self, Color color)