Set spectator color to white & remove selector.

This commit is contained in:
Paul Chote
2013-06-26 22:26:17 +12:00
parent 859af00f1c
commit 1fce900801
5 changed files with 15 additions and 65 deletions

View File

@@ -137,6 +137,7 @@ namespace OpenRA.Mods.RA.Server
{
client.Slot = null;
client.SpawnPoint = 0;
client.Color = HSLColor.FromRGB(255, 255, 255);
server.SyncLobbyInfo();
return true;
}},
@@ -530,8 +531,8 @@ namespace OpenRA.Mods.RA.Server
if (targetClient.Index != client.Index && !client.IsAdmin)
return true;
// Map has disabled color changes
if (targetClient.Slot != null && server.lobbyInfo.Slots[targetClient.Slot].LockColor)
// Spectator or 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();