Use Target range checks in AttackLeap.

This commit is contained in:
Paul Chote
2013-07-06 15:30:48 +12:00
parent 3a0f6dda08
commit 07f9575bb7

View File

@@ -36,7 +36,9 @@ namespace OpenRA.Mods.RA
if (a == null) if (a == null)
return; return;
if (!Combat.IsInRange(self.CenterLocation, a.Weapon.Range, target)) // TODO: Define weapon ranges as WRange
var range = new WRange((int)(1024*a.Weapon.Range));
if (!target.IsInRange(self.CenterPosition, range))
return; return;
self.CancelActivity(); self.CancelActivity();