From 51aca8de9ace97b0dc99d40dac7d8ab0c86d6aef Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sun, 18 Oct 2015 01:18:11 +0200 Subject: [PATCH] Fix hardcoded player color ramp Lerp --- OpenRA.Game/Graphics/PlayerColorRemap.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Game/Graphics/PlayerColorRemap.cs b/OpenRA.Game/Graphics/PlayerColorRemap.cs index 6f45c400c5..27a80edf53 100644 --- a/OpenRA.Game/Graphics/PlayerColorRemap.cs +++ b/OpenRA.Game/Graphics/PlayerColorRemap.cs @@ -43,7 +43,7 @@ namespace OpenRA.Graphics remapRamp = ramp.Select(r => r - ramp[rampMaxIndex]); } - remapColors = remapRamp.Select((x, i) => Pair.New(baseIndex + i, Exts.ColorLerp(x / 16f, c1, c2))) + remapColors = remapRamp.Select((x, i) => Pair.New(baseIndex + i, Exts.ColorLerp(x / (float)ramp.Length, c1, c2))) .ToDictionary(u => u.First, u => u.Second); }