From fbeb638582d33a9f198e2f83e9c5bfeb1bc6a031 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 26 Nov 2010 10:56:41 +1300 Subject: [PATCH] Center the viewport by default. --- OpenRA.Game/Graphics/Viewport.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Game/Graphics/Viewport.cs b/OpenRA.Game/Graphics/Viewport.cs index d8b5668a25..7922f6e7ae 100755 --- a/OpenRA.Game/Graphics/Viewport.cs +++ b/OpenRA.Game/Graphics/Viewport.cs @@ -78,7 +78,7 @@ namespace OpenRA.Graphics Game.CellSize*mapBounds.Y - screenSize.Y/2, Game.CellSize*mapBounds.Width, Game.CellSize*mapBounds.Height); - this.scrollPosition = new int2(adjustedMapBounds.Location); + this.scrollPosition = new int2(adjustedMapBounds.Location) + new int2(adjustedMapBounds.Size)/2; } public void DrawRegions( WorldRenderer wr, IInputHandler inputHandler )