Do not validate the color of players which have the LockColor flag set
Fixes #6572
This commit is contained in:
@@ -203,9 +203,11 @@ namespace OpenRA.Mods.Common.Server
|
|||||||
public void ClientJoined(S server, Connection conn)
|
public void ClientJoined(S server, Connection conn)
|
||||||
{
|
{
|
||||||
var client = server.GetClient(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
|
// Validate whether color is allowed and get an alternative if it isn't
|
||||||
client.Color = ColorValidator.ValidatePlayerColorAndGetAlternative(server, client.Color, client.Index);
|
if (!server.LobbyInfo.Slots[slot].LockColor)
|
||||||
|
client.Color = ColorValidator.ValidatePlayerColorAndGetAlternative(server, client.Color, client.Index);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user