mirror of
https://github.com/ppy/osu
synced 2025-01-16 02:51:20 +00:00
Merge pull request #3133 from phosphene47/player-esc-result
Fix hitting "exit" key after gameplay ends not showing results
This commit is contained in:
commit
7642db3572
@ -278,6 +278,8 @@ namespace osu.Game.Screens.Play
|
||||
ScoreProcessor.PopulateScore(score);
|
||||
score.User = RulesetContainer.Replay?.User ?? api.LocalUser.Value;
|
||||
Push(new Results(score));
|
||||
|
||||
onCompletionEvent = null;
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -340,6 +342,13 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
protected override bool OnExiting(Screen next)
|
||||
{
|
||||
if (onCompletionEvent != null)
|
||||
{
|
||||
// Proceed to result screen if beatmap already finished playing
|
||||
onCompletionEvent.RunTask();
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((!AllowPause || HasFailed || !ValidForResume || pauseContainer?.IsPaused != false || RulesetContainer?.HasReplayLoaded != false) && (!pauseContainer?.IsResuming ?? true))
|
||||
{
|
||||
// In the case of replays, we may have changed the playback rate.
|
||||
|
Loading…
Reference in New Issue
Block a user