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:
@@ -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;
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user