diff --git a/OpenRA.Mods.RA/ServerTraits/PlayerCommands.cs b/OpenRA.Mods.RA/ServerTraits/PlayerCommands.cs index bce094501b..62b12971dc 100644 --- a/OpenRA.Mods.RA/ServerTraits/PlayerCommands.cs +++ b/OpenRA.Mods.RA/ServerTraits/PlayerCommands.cs @@ -54,6 +54,10 @@ namespace OpenRA.Mods.RA.Server if (targetClient.Index != client.Index && conn.PlayerIndex != 0) return true; + // Map has disabled race changes + if (server.lobbyInfo.Slots[targetClient.Slot].LockRace) + return true; + targetClient.Country = parts[1]; server.SyncLobbyInfo(); return true; @@ -68,6 +72,10 @@ namespace OpenRA.Mods.RA.Server if (targetClient.Index != client.Index && conn.PlayerIndex != 0) return true; + // Map has disabled team changes + if (server.lobbyInfo.Slots[targetClient.Slot].LockTeam) + return true; + int team; if (!int.TryParse(parts[1], out team)) { Log.Write("server", "Invalid team: {0}", s ); return false; } @@ -116,6 +124,10 @@ namespace OpenRA.Mods.RA.Server if (targetClient.Index != client.Index && conn.PlayerIndex != 0) return true; + // Map has disabled color changes + if (targetClient.Slot != null && server.lobbyInfo.Slots[targetClient.Slot].LockColor) + 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]); server.SyncLobbyInfo();