From be8d32688b99c7aae8b7444ed4b021187c7ccd0a Mon Sep 17 00:00:00 2001 From: ocboogie Date: Mon, 17 Apr 2017 22:36:03 -0700 Subject: [PATCH] Fixed HotkeyRetryOverlay just going to a black screen --- osu.Game/Screens/Play/Player.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 60903d66c4..4275530187 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -46,6 +46,8 @@ namespace osu.Game.Screens.Play private const double pause_cooldown = 1000; private double lastPauseActionTime; + private bool restarting = false; + private bool canPause => ValidForResume && !HasFailed && Time.Current >= lastPauseActionTime + pause_cooldown; private IAdjustableClock sourceClock; @@ -245,6 +247,7 @@ namespace osu.Game.Screens.Play public void Restart() { + restarting = true; OnRestart?.Invoke(); Exit(); } @@ -320,7 +323,7 @@ namespace osu.Game.Screens.Play if (HasFailed || !ValidForResume) return false; - if (pauseOverlay != null && !HitRenderer.HasReplayLoaded) + if (pauseOverlay != null && !HitRenderer.HasReplayLoaded && !restarting) { //pause screen override logic. if (pauseOverlay?.State == Visibility.Hidden && !canPause) return true;