add Target overload for IsInRange

This commit is contained in:
Bob
2010-11-04 00:37:13 +13:00
committed by Chris Forbes
parent ecf41722c3
commit a77b7af5fd
4 changed files with 13 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Mods.RA.Activities
var mobile = self.Trait<Mobile>();
var targetCell = Util.CellContaining(Target.CenterLocation);
if (!Combat.IsInRange( self.CenterLocation, Range, Util.CenterOfCell(targetCell)))
if (!Combat.IsInRange( self.CenterLocation, Range, Target))
return Util.SequenceActivities( mobile.MoveTo( Target, Range ), this );
var desiredFacing = Util.GetFacing((targetCell - self.Location).ToFloat2(), 0);