Predict local pause state to avoid order lag. Fixes #3223.

This commit is contained in:
Paul Chote
2013-05-09 20:12:37 +12:00
parent abcc30f0b7
commit c3c5321e1d
6 changed files with 19 additions and 11 deletions

View File

@@ -177,9 +177,16 @@ namespace OpenRA
public event Action<Actor> ActorAdded = _ => { };
public event Action<Actor> ActorRemoved = _ => { };
public bool Paused = false;
public bool Paused { get; internal set; }
public bool PredictedPaused { get; internal set; }
public bool IsShellmap = false;
public void SetPauseState(bool paused)
{
IssueOrder(Order.PauseGame(paused));
PredictedPaused = paused;
}
public void Tick()
{
if (!Paused && (!IsShellmap || Game.Settings.Game.ShowShellmap))