From 25726342c6b0fad082f7627596029c9501fd43a9 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 29 Dec 2009 20:12:06 +1300 Subject: [PATCH] fixed problem with centering yielding fractional positions --- 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 84c9ca5a2f..9a35a4ef5b 100644 --- a/OpenRa.Game/Graphics/Viewport.cs +++ b/OpenRa.Game/Graphics/Viewport.cs @@ -92,7 +92,7 @@ namespace OpenRa.Game.Graphics .Select(a => a.CenterLocation) .Aggregate((a, b) => a + b); - scrollPosition = avgPos - .5f * new float2(Width, Height); + scrollPosition = (avgPos - .5f * new float2(Width, Height)).ToInt2(); } public void GoToStartLocation()