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

@@ -30,6 +30,11 @@ namespace OpenRA.Traits
return ( facing - rot ) & 0xFF;
}
public static int GetFacing(WVec d, int currentFacing)
{
return GetFacing(new int2(d.X, d.Y), currentFacing);
}
public static int GetFacing(PVecInt d, int currentFacing)
{
return GetFacing(d.ToInt2(), currentFacing);