Convert BaseProvider range check to world coords.

This commit is contained in:
Paul Chote
2013-07-06 16:10:31 +12:00
parent d631f1b06b
commit 39e699d119
7 changed files with 25 additions and 30 deletions

View File

@@ -65,7 +65,8 @@ namespace OpenRA.Mods.RA.Buildings
public static WVec CenterOffset(BuildingInfo buildingInfo)
{
var dim = buildingInfo.Dimensions;
return new CVec(dim.X, dim.Y).ToWVec() / 2;
// Offset is measured relative to the center of the cell, so need to subtract an additional half cell.
return new CVec(dim.X, dim.Y).ToWVec() / 2 - new WVec(512, 512, 0);
}
}
}