Calculate building placement offsets in screen space.
This commit is contained in:
committed by
Oliver Brakmann
parent
0161d68237
commit
0f6dda3f5f
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user