Fixed the building placement to have the cursor in the centre. Replaced magic numbers with Game.CellSize
Using the building footprint, the placement overlay is offset from the cursor so the cursor is in the approximate middle of the overlay (not precisely due to overlay snapping to tiles). The tile size (24) was used as a magic number in a lot of places, they have been replaced with Game.CellSize.
This commit is contained in:
@@ -25,7 +25,7 @@ namespace OpenRa.Game.Graphics
|
||||
public Viewport(float2 size, float2 mapSize, Renderer renderer)
|
||||
{
|
||||
this.size = size;
|
||||
this.mapSize = 24 * mapSize - size + new float2(128, 0);
|
||||
this.mapSize = Game.CellSize * mapSize - size + new float2(128, 0);
|
||||
this.renderer = renderer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user