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

@@ -47,7 +47,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
optionsBG.Visible = false;
if (world.LobbyInfo.IsSinglePlayer)
world.IssueOrder(Order.PauseGame(cachedPause));
world.SetPauseState(cachedPause);
}
}
});
@@ -57,13 +57,13 @@ namespace OpenRA.Mods.RA.Widgets.Logic
optionsBG.Visible ^= true;
if (optionsBG.Visible)
{
cachedPause = world.Paused;
cachedPause = world.PredictedPaused;
if (world.LobbyInfo.IsSinglePlayer)
world.IssueOrder(Order.PauseGame(true));
world.SetPauseState(true);
}
else
world.IssueOrder(Order.PauseGame(cachedPause));
world.SetPauseState(cachedPause);
};
Game.LoadWidget(world, "CHAT_PANEL", gameRoot, new WidgetArgs());