Don’t sample map height when calculating building centers.

This commit is contained in:
Paul Chote
2015-09-02 16:06:05 +01:00
parent c4bf92870b
commit 04c61727f7

View File

@@ -65,7 +65,8 @@ namespace OpenRA.Mods.Common.Traits
public static WVec CenterOffset(World w, BuildingInfo buildingInfo)
{
var dim = buildingInfo.Dimensions;
return (w.Map.CenterOfCell(CPos.Zero + new CVec(dim.X, dim.Y)) - w.Map.CenterOfCell(new CPos(1, 1))) / 2;
var off = (w.Map.CenterOfCell(new CPos(dim.X, dim.Y)) - w.Map.CenterOfCell(new CPos(1, 1))) / 2;
return off - new WVec(0, 0, off.Z);
}
}
}