Use Target range checks in AttackLoyalty.

This commit is contained in:
Paul Chote
2013-07-06 15:30:55 +12:00
parent 07f9575bb7
commit 4a471eff8b

View File

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