From 3a356782fca1f467f705d96ff3f1d129b28b8c11 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 6 Jul 2013 11:11:48 +1200 Subject: [PATCH 1/2] Force spectator color to white on join. Fixes #3501. --- OpenRA.Game/Server/Server.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Server/Server.cs b/OpenRA.Game/Server/Server.cs index 06a61d932c..6592c0835c 100644 --- a/OpenRA.Game/Server/Server.cs +++ b/OpenRA.Game/Server/Server.cs @@ -255,10 +255,11 @@ namespace OpenRA.Server if (client.Slot != null) SyncClientToPlayerReference(client, Map.Players[client.Slot]); - - var mods = handshake.Mods; + else + client.Color = HSLColor.FromRGB(255, 255, 255); // Check that the client has compatible mods + var mods = handshake.Mods; var validMod = mods.All(m => m.Contains('@')) && //valid format mods.Count() == Game.CurrentMods.Count() && //same number mods.Select(m => Pair.New(m.Split('@')[0], m.Split('@')[1])).All(kv => Game.CurrentMods.ContainsKey(kv.First)); From 18cecf8a67ccf9675cef2d99a72b6d0cc0ccd491 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 6 Jul 2013 11:31:43 +1200 Subject: [PATCH 2/2] Disable pausing for spectators. Fixes #3340. --- OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs index cbe1d9ed03..2c243507fe 100644 --- a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs +++ b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs @@ -174,7 +174,9 @@ namespace OpenRA.Widgets world.Selection.DoControlGroup(world, e.KeyName[0] - '0', e.Modifiers, e.MultiTapCount); return true; } - else if (e.KeyName == Game.Settings.Keys.PauseKey) + + // Disable pausing for spectators + else if (e.KeyName == Game.Settings.Keys.PauseKey && world.LocalPlayer != null) world.SetPauseState(!world.Paused); } return false;