1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:03:21 +08:00

Change conditional ordering to allow player to always run its fadeOut sequence.

This commit is contained in:
Dean Herbert 2017-04-18 16:47:30 +09:00
parent 24deaf05b6
commit 2ccb8b154f
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -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;
}
}
}