Fix serialization errors when hosting MP game.

Follows D2746 / 9fc6c3c897 and dad2857538.
Player colors are copied from the settings, which are deep-frozen, thus
not extensible. Cloning them restores that, allowing serialization.

Reported By: Angen
Differential Revision: https://code.wildfiregames.com/D3263
This was SVN commit r24466.
This commit is contained in:
wraitii 2020-12-28 17:44:20 +00:00
parent 9fc6c3c897
commit f0faab7a42

View file

@ -48,7 +48,7 @@ PlayerSettingControls.PlayerColor = class extends GameSettingControlDropdown
smallestDistance = distance;
}
}
this.values.push(closestColor);
this.values.push(clone(closestColor));
}
this.dropdown.list = this.values.map(color => coloredText(this.ColorIcon, rgbToGuiColor(color)));