Preserve original brightness when remapping player colors.

This commit is contained in:
Paul Chote
2021-04-10 18:12:50 +01:00
committed by teinarss
parent 9d62ce214c
commit 4042d5b179
5 changed files with 34 additions and 43 deletions

View File

@@ -54,8 +54,7 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
// the remap range is always 16 entries, but their location and order changes
for (var i = 0; i < 16; i++)
remap[PlayerColorRemap.GetRemapIndex(srcRemapIndex, i)]
= PlayerColorRemap.GetRemapIndex(destRemapIndex, i);
remap[srcRemapIndex[i]] = destRemapIndex[i];
// map everything else to the best match based on channel-wise distance
var srcPalette = new ImmutablePalette(args[1].Split(':')[1], new[] { 0 }, shadowIndex);