From 308a7b0cf67c59b44c66d9409009dfb060b8adf3 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 23 Jun 2010 18:19:10 +1200 Subject: [PATCH] remove hardcoded magic number --- OpenRA.Game/Traits/Util.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Game/Traits/Util.cs b/OpenRA.Game/Traits/Util.cs index efcc3297aa..f34cb5a14f 100755 --- a/OpenRA.Game/Traits/Util.cs +++ b/OpenRA.Game/Traits/Util.cs @@ -173,6 +173,6 @@ namespace OpenRA.Traits public static Color ArrayToColor(int[] x) { return Color.FromArgb(x[0], x[1], x[2]); } - public static int2 CellContaining(float2 pos) { return (1 / 24f * pos).ToInt2(); } + public static int2 CellContaining(float2 pos) { return (1f / Game.CellSize * pos).ToInt2(); } } }