From 1860e636cf5a21aaf09149a8ae2b9a86ebc293d1 Mon Sep 17 00:00:00 2001 From: Alli Date: Sat, 6 Feb 2010 17:18:35 +1300 Subject: [PATCH] less unnecessary math --- OpenRa.Game/Chrome.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRa.Game/Chrome.cs b/OpenRa.Game/Chrome.cs index 130f1f1032..8b4e5e8158 100644 --- a/OpenRa.Game/Chrome.cs +++ b/OpenRa.Game/Chrome.cs @@ -302,7 +302,8 @@ namespace OpenRa var y = r.Top + 50; - int numListItems = (int) Math.Floor( (decimal) ((r.Bottom - 60 - y ) / 20)); + int numListItems = ((r.Bottom - 60 - y ) / 20); + for(int i = mapOffset; i < numListItems + mapOffset; i++, y += 20){ var map = mapList.Value.ElementAt(i); var itemRect = new Rectangle(r.Left + 50, y - 2, r.Width - 340, 20);