Account for sub-cell offsets in FindUnitPathToRange. Fixes #2417.

This commit is contained in:
Paul Chote
2013-07-10 21:17:25 +12:00
parent b10a5d27a0
commit a263fd879d
2 changed files with 15 additions and 6 deletions

View File

@@ -75,9 +75,8 @@ namespace OpenRA.Mods.RA.Move
if (!target.IsValid)
return NoPath;
// TODO: Adjust range to account for target center position
return self.World.WorldActor.Trait<PathFinder>().FindUnitPathToRange(
mobile.toCell, target.CenterPosition.ToCPos(), range.Range / 1024, self);
mobile.toCell, mobile.toSubCell, target.CenterPosition, range, self);
};
this.destination = null;