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

@@ -55,11 +55,11 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
public void OptionsClicked()
{
var cachedPause = world.Paused;
var cachedPause = world.PredictedPaused;
ingameRoot.IsVisible = () => false;
if (world.LobbyInfo.IsSinglePlayer)
world.IssueOrder(Order.PauseGame(true));
world.SetPauseState(true);
Game.LoadWidget(world, "INGAME_MENU", Ui.Root, new WidgetArgs()
{
@@ -67,7 +67,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
{
ingameRoot.IsVisible = () => true;
if (world.LobbyInfo.IsSinglePlayer)
world.IssueOrder(Order.PauseGame(cachedPause));
world.SetPauseState(cachedPause);
}
}
});