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:
@@ -188,14 +188,23 @@ namespace OpenRA
|
|||||||
|
|
||||||
public bool Paused { get; internal set; }
|
public bool Paused { get; internal set; }
|
||||||
public bool PredictedPaused { get; internal set; }
|
public bool PredictedPaused { get; internal set; }
|
||||||
|
public bool PauseStateLocked { get; set; }
|
||||||
public bool IsShellmap = false;
|
public bool IsShellmap = false;
|
||||||
|
|
||||||
public void SetPauseState(bool paused)
|
public void SetPauseState(bool paused)
|
||||||
{
|
{
|
||||||
|
if (PauseStateLocked)
|
||||||
|
return;
|
||||||
|
|
||||||
IssueOrder(Order.PauseGame(paused));
|
IssueOrder(Order.PauseGame(paused));
|
||||||
PredictedPaused = paused;
|
PredictedPaused = paused;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetLocalPauseState(bool paused)
|
||||||
|
{
|
||||||
|
Paused = PredictedPaused = paused;
|
||||||
|
}
|
||||||
|
|
||||||
public void Tick()
|
public void Tick()
|
||||||
{
|
{
|
||||||
if (!Paused && (!IsShellmap || Game.Settings.Game.ShowShellmap))
|
if (!Paused && (!IsShellmap || Game.Settings.Game.ShowShellmap))
|
||||||
|
|||||||
Reference in New Issue
Block a user