Make Range WDist for all traits with circular ranges.

This commit is contained in:
atlimit8
2015-09-07 13:07:35 -05:00
parent d77839bb3d
commit de7f5a4288
34 changed files with 85 additions and 76 deletions

View File

@@ -154,7 +154,7 @@ namespace OpenRA.Mods.Common.Traits
return self.World.ActorsWithTrait<DetectCloaked>().Any(a => !a.Trait.IsTraitDisabled && a.Actor.Owner.IsAlliedWith(viewer)
&& Info.CloakTypes.Overlaps(a.Trait.Info.CloakTypes)
&& (self.CenterPosition - a.Actor.CenterPosition).Length <= WDist.FromCells(a.Trait.Info.Range).Length);
&& (self.CenterPosition - a.Actor.CenterPosition).LengthSquared <= a.Trait.Info.Range.LengthSquared);
}
public Color RadarColorOverride(Actor self)