Revert client colours to their preferred colours after the map is changed to a map which doesn't lock colours.

This commit is contained in:
Scott_NZ
2013-03-02 16:18:09 +13:00
parent 46f4685eec
commit 63467cd000
4 changed files with 8 additions and 3 deletions

View File

@@ -230,7 +230,7 @@ namespace OpenRA.Mods.RA.Server
var hue = (byte)server.Random.Next(255);
var sat = (byte)server.Random.Next(255);
var lum = (byte)server.Random.Next(51,255);
bot.ColorRamp = new ColorRamp(hue, sat, lum, 10);
bot.ColorRamp = bot.PreferredColorRamp = new ColorRamp(hue, sat, lum, 10);
server.lobbyInfo.Clients.Add(bot);
}
@@ -472,7 +472,7 @@ namespace OpenRA.Mods.RA.Server
return true;
var ci = parts[1].Split(',').Select(cc => int.Parse(cc)).ToArray();
targetClient.ColorRamp = new ColorRamp((byte)ci[0], (byte)ci[1], (byte)ci[2], (byte)ci[3]);
targetClient.ColorRamp = targetClient.PreferredColorRamp = new ColorRamp((byte)ci[0], (byte)ci[1], (byte)ci[2], (byte)ci[3]);
server.SyncLobbyInfo();
return true;
}}