Lost players except Host can not pause game #12227

This commit is contained in:
rob-v
2017-04-02 12:03:55 +02:00
parent 739653ce37
commit a11ff104a2
2 changed files with 11 additions and 9 deletions

View File

@@ -241,7 +241,8 @@ namespace OpenRA.Mods.Common.Widgets
{
var key = Hotkey.FromKeyInput(e);
if (key == Game.Settings.Keys.PauseKey && World.LocalPlayer != null) // Disable pausing for spectators
if (key == Game.Settings.Keys.PauseKey
&& (Game.IsHost || (World.LocalPlayer != null && World.LocalPlayer.WinState != WinState.Lost))) // Disable pausing for spectators and defeated players
World.SetPauseState(!World.Paused);
else if (key == Game.Settings.Keys.SelectAllUnitsKey && !World.IsGameOver)
{