Merge pull request #3527 from pchote/spectator-color-fix
Spectator fixes
This commit is contained in:
@@ -255,10 +255,11 @@ namespace OpenRA.Server
|
|||||||
|
|
||||||
if (client.Slot != null)
|
if (client.Slot != null)
|
||||||
SyncClientToPlayerReference(client, Map.Players[client.Slot]);
|
SyncClientToPlayerReference(client, Map.Players[client.Slot]);
|
||||||
|
else
|
||||||
var mods = handshake.Mods;
|
client.Color = HSLColor.FromRGB(255, 255, 255);
|
||||||
|
|
||||||
// Check that the client has compatible mods
|
// Check that the client has compatible mods
|
||||||
|
var mods = handshake.Mods;
|
||||||
var validMod = mods.All(m => m.Contains('@')) && //valid format
|
var validMod = mods.All(m => m.Contains('@')) && //valid format
|
||||||
mods.Count() == Game.CurrentMods.Count() && //same number
|
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));
|
mods.Select(m => Pair.New(m.Split('@')[0], m.Split('@')[1])).All(kv => Game.CurrentMods.ContainsKey(kv.First));
|
||||||
|
|||||||
@@ -174,7 +174,9 @@ namespace OpenRA.Widgets
|
|||||||
world.Selection.DoControlGroup(world, e.KeyName[0] - '0', e.Modifiers, e.MultiTapCount);
|
world.Selection.DoControlGroup(world, e.KeyName[0] - '0', e.Modifiers, e.MultiTapCount);
|
||||||
return true;
|
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);
|
world.SetPauseState(!world.Paused);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user