Use .Yaw.Facing in Map.

This commit is contained in:
Paul Chote
2016-01-15 18:44:16 +00:00
parent 8a8368b97b
commit a0979634bb

View File

@@ -915,7 +915,11 @@ namespace OpenRA
public int FacingBetween(CPos cell, CPos towards, int fallbackfacing)
{
return Traits.Util.GetFacing(CenterOfCell(towards) - CenterOfCell(cell), fallbackfacing);
var delta = CenterOfCell(towards) - CenterOfCell(cell);
if (delta.HorizontalLengthSquared == 0)
return fallbackfacing;
return delta.Yaw.Facing;
}
public void Resize(int width, int height) // editor magic.