Add a function to World for setting just the local pause state, and add a lock variable to prevent further pause state changes

This commit is contained in:
ScottNZ
2013-11-29 23:01:18 +13:00
parent b69508fb6b
commit e4e6169f7f

View File

@@ -188,14 +188,23 @@ namespace OpenRA
public bool Paused { get; internal set; }
public bool PredictedPaused { get; internal set; }
public bool PauseStateLocked { get; set; }
public bool IsShellmap = false;
public void SetPauseState(bool paused)
{
if (PauseStateLocked)
return;
IssueOrder(Order.PauseGame(paused));
PredictedPaused = paused;
}
public void SetLocalPauseState(bool paused)
{
Paused = PredictedPaused = paused;
}
public void Tick()
{
if (!Paused && (!IsShellmap || Game.Settings.Game.ShowShellmap))