Fix bogus pause logic.

This commit is contained in:
Paul Chote
2013-04-07 21:52:49 +12:00
parent 3272b6725e
commit 096d95f391
13 changed files with 57 additions and 69 deletions

View File

@@ -85,6 +85,8 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
public void OptionsClicked()
{
var cachedPause = world.Paused;
if (menu != MenuType.None)
{
Ui.CloseWindow();
@@ -93,14 +95,15 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
ingameRoot.IsVisible = () => false;
if (world.LobbyInfo.IsSinglePlayer)
world.IssueOrder(Order.PauseGame());
world.IssueOrder(Order.PauseGame(true));
Game.LoadWidget(world, "INGAME_MENU", Ui.Root, new WidgetArgs()
{
{ "onExit", () =>
{
ingameRoot.IsVisible = () => true;
if (world.LobbyInfo.IsSinglePlayer)
world.IssueOrder(Order.PauseGame());
world.IssueOrder(Order.PauseGame(cachedPause));
}
}
});