1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:03:08 +08:00

Fix early-escape not continuing to results screen (#7362)

Fix early-escape not continuing to results screen
This commit is contained in:
Dean Herbert 2019-12-26 23:50:21 +09:00 committed by GitHub
commit 033bb15500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -368,18 +368,7 @@ namespace osu.Game.Screens.Play
if (!showResults) return;
using (BeginDelayedSequence(1000))
{
completionProgressDelegate = Schedule(delegate
{
if (!this.IsCurrentScreen()) return;
var score = CreateScore();
if (DrawableRuleset.ReplayScore == null)
scoreManager.Import(score).Wait();
this.Push(CreateResults(score));
});
}
scheduleGotoRanking();
}
protected virtual ScoreInfo CreateScore()
@ -560,7 +549,7 @@ namespace osu.Game.Screens.Play
if (completionProgressDelegate != null && !completionProgressDelegate.Cancelled && !completionProgressDelegate.Completed)
{
// proceed to result screen if beatmap already finished playing
completionProgressDelegate.RunTask();
scheduleGotoRanking();
return true;
}
@ -595,6 +584,19 @@ namespace osu.Game.Screens.Play
storyboardReplacesBackground.Value = false;
}
private void scheduleGotoRanking()
{
completionProgressDelegate?.Cancel();
completionProgressDelegate = Schedule(delegate
{
var score = CreateScore();
if (DrawableRuleset.ReplayScore == null)
scoreManager.Import(score).Wait();
this.Push(CreateResults(score));
});
}
#endregion
}
}