mirror of https://github.com/ppy/osu
Change conditional ordering to allow player to always run its fadeOut sequence.
This commit is contained in:
parent
24deaf05b6
commit
2ccb8b154f
|
@ -315,24 +315,23 @@ protected override void OnEntering(Screen last)
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue