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

@@ -100,9 +100,9 @@ namespace OpenRA.Traits
return loc.ToPPos() + new PVecInt(Game.CellSize / 2, Game.CellSize / 2);
}
public static PPos BetweenCells(CPos from, CPos to)
public static WPos BetweenCells(CPos from, CPos to)
{
return PPos.Lerp(CenterOfCell(from), CenterOfCell(to), 1, 2);
return WPos.Lerp(from.CenterPosition, to.CenterPosition, 1, 2);
}
public static int2 AsInt2(this int[] xs) { return new int2(xs[0], xs[1]); }