Convert Move and related plumbing to world coordinates.

This commit is contained in:
Paul Chote
2013-07-21 11:31:38 +12:00
parent abdfac6e85
commit 0676116d77
9 changed files with 29 additions and 36 deletions

View File

@@ -76,8 +76,8 @@ namespace OpenRA.Mods.RA
if (mobile != null)
{
// Animate the spawn -> exit transition
var speed = mobile.WorldMovementSpeedForCell(newUnit, exit);
var length = speed > 0 ? (int)((to - spawn).Length * 3 / speed) : 0;
var speed = mobile.MovementSpeedForCell(newUnit, exit);
var length = speed > 0 ? (to - spawn).Length / speed : 0;
newUnit.QueueActivity(new Drag(spawn, to, length));
}