Convert Drag to world coords.

This commit is contained in:
Paul Chote
2013-07-06 19:55:16 +12:00
parent 7f25573cfa
commit 0fdffd7b6a
8 changed files with 40 additions and 28 deletions

View File

@@ -35,9 +35,9 @@ namespace OpenRA.Mods.RA.Activities
// Move to the middle of the target, ignoring impassable tiles
var mobile = self.Trait<Mobile>();
var to = target.CenterLocation;
var from = self.CenterLocation;
var speed = mobile.MovementSpeedForCell(self, self.Location);
var to = target.CenterPosition;
var from = self.CenterPosition;
var speed = mobile.WorldMovementSpeedForCell(self, self.Location);
var length = speed > 0 ? (int)((to - from).Length * 3 / speed) : 0;
return Util.SequenceActivities(