Merge pull request #3238 from pchote/local-pause-state

Remove local pause order lag delay
This commit is contained in:
Matthias Mailänder
2013-05-10 03:07:08 -07:00
6 changed files with 19 additions and 11 deletions

View File

@@ -32,7 +32,7 @@ namespace OpenRA.Scripting
return;
}
w.Paused = true;
w.SetPauseState(true);
// Mute world sounds
var oldModifier = Sound.SoundVolumeModifier;
@@ -51,7 +51,7 @@ namespace OpenRA.Scripting
Ui.CloseWindow();
Sound.SoundVolumeModifier = oldModifier;
w.Paused = false;
w.SetPauseState(false);
onComplete();
});
}

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());