Prevent injected unpause orders from restarting a finished game.

This commit is contained in:
Paul Chote
2018-02-03 17:51:27 +00:00
committed by reaperrr
parent 258df13451
commit 234e6cc566

View File

@@ -125,6 +125,11 @@ namespace OpenRA.Network
if (client != null) if (client != null)
{ {
var pause = order.TargetString == "Pause"; var pause = order.TargetString == "Pause";
// Prevent injected unpause orders from restarting a finished game
if (orderManager.World.PauseStateLocked && !pause)
break;
if (orderManager.World.Paused != pause && world != null && world.LobbyInfo.NonBotClients.Count() > 1) if (orderManager.World.Paused != pause && world != null && world.LobbyInfo.NonBotClients.Count() > 1)
{ {
var pausetext = "The game is {0} by {1}".F(pause ? "paused" : "un-paused", client.Name); var pausetext = "The game is {0} by {1}".F(pause ? "paused" : "un-paused", client.Name);