Calculate building placement offsets in screen space.

This commit is contained in:
Paul Chote
2017-09-10 11:09:18 +00:00
committed by Oliver Brakmann
parent 0161d68237
commit 0f6dda3f5f
4 changed files with 19 additions and 24 deletions

View File

@@ -144,11 +144,6 @@ namespace OpenRA.Mods.Common.Traits
yield return t;
}
public CVec LocationOffset()
{
return new CVec(Dimensions.X / 2, Dimensions.Y > 1 ? (Dimensions.Y + 1) / 2 : 0);
}
public WVec CenterOffset(World w)
{
var off = (w.Map.CenterOfCell(new CPos(Dimensions.X, Dimensions.Y)) - w.Map.CenterOfCell(new CPos(1, 1))) / 2;