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

@@ -143,7 +143,7 @@ namespace OpenRA.Mods.Common.Effects
bool JammedBy(TraitPair<JamsMissiles> tp)
{
if ((tp.Actor.CenterPosition - pos).HorizontalLengthSquared > tp.Trait.Range * tp.Trait.Range)
if ((tp.Actor.CenterPosition - pos).HorizontalLengthSquared > tp.Trait.Range.LengthSquared)
return false;
if (tp.Actor.Owner.Stances[args.SourceActor.Owner] == Stance.Ally && !tp.Trait.AlliedMissiles)