Do not validate the color of players which have the LockColor flag set

Fixes #6572
This commit is contained in:
Oliver Brakmann
2014-09-27 01:41:40 +02:00
parent 8d54efc7af
commit 00dc6f1633

View File

@@ -203,9 +203,11 @@ namespace OpenRA.Mods.Common.Server
public void ClientJoined(S server, Connection conn)
{
var client = server.GetClient(conn);
var slot = server.LobbyInfo.Clients[client.Index].Slot;
// Validate if color is allowed and get an alternative if it isn't
client.Color = ColorValidator.ValidatePlayerColorAndGetAlternative(server, client.Color, client.Index);
// Validate whether color is allowed and get an alternative if it isn't
if (!server.LobbyInfo.Slots[slot].LockColor)
client.Color = ColorValidator.ValidatePlayerColorAndGetAlternative(server, client.Color, client.Index);
}
#endregion