From 2ccb8b154f73ddd46407fb6a853a075f9489dafc Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 18 Apr 2017 16:47:30 +0900 Subject: [PATCH] Change conditional ordering to allow player to always run its fadeOut sequence. --- osu.Game/Screens/Play/Player.cs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 7cee080f61..d0f2e2be5a 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -315,24 +315,23 @@ namespace osu.Game.Screens.Play protected override void OnSuspending(Screen next) { fadeOut(); - base.OnSuspending(next); } protected override bool OnExiting(Screen next) { - if (HasFailed || !ValidForResume) - return false; - - if (pauseOverlay != null && !HitRenderer.HasReplayLoaded) + if (!HasFailed && ValidForResume) { - //pause screen override logic. - if (pauseOverlay?.State == Visibility.Hidden && !canPause) return true; - - if (!IsPaused) // For if the user presses escape quickly when entering the map + if (pauseOverlay != null && !HitRenderer.HasReplayLoaded) { - Pause(); - return true; + //pause screen override logic. + if (pauseOverlay?.State == Visibility.Hidden && !canPause) return true; + + if (!IsPaused) // For if the user presses escape quickly when entering the map + { + Pause(); + return true; + } } }