Merge pull request #3238 from pchote/local-pause-state
Remove local pause order lag delay
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user