mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
Fix auto mod results not displaying correctly
This commit is contained in:
parent
de969c07ea
commit
4f5557096c
@ -637,28 +637,19 @@ namespace osu.Game.Screens.Play
|
|||||||
return base.OnExiting(next);
|
return base.OnExiting(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fadeOut(bool instant = false)
|
protected virtual void GotoRanking()
|
||||||
{
|
|
||||||
float fadeOutDuration = instant ? 0 : 250;
|
|
||||||
this.FadeOut(fadeOutDuration);
|
|
||||||
|
|
||||||
Background.EnableUserDim.Value = false;
|
|
||||||
storyboardReplacesBackground.Value = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void scheduleGotoRanking()
|
|
||||||
{
|
|
||||||
completionProgressDelegate?.Cancel();
|
|
||||||
completionProgressDelegate = Schedule(delegate
|
|
||||||
{
|
{
|
||||||
if (DrawableRuleset.ReplayScore != null)
|
if (DrawableRuleset.ReplayScore != null)
|
||||||
this.Push(CreateResults(DrawableRuleset.ReplayScore.ScoreInfo));
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
var score = new Score { ScoreInfo = CreateScore() };
|
// if a replay is present, we likely don't want to import into the local database.
|
||||||
|
this.Push(CreateResults(CreateScore()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LegacyByteArrayReader replayReader = null;
|
LegacyByteArrayReader replayReader = null;
|
||||||
|
|
||||||
|
var score = new Score { ScoreInfo = CreateScore() };
|
||||||
|
|
||||||
if (recordingReplay?.Frames.Count > 0)
|
if (recordingReplay?.Frames.Count > 0)
|
||||||
{
|
{
|
||||||
score.Replay = recordingReplay;
|
score.Replay = recordingReplay;
|
||||||
@ -678,7 +669,20 @@ namespace osu.Game.Screens.Play
|
|||||||
this.Push(CreateResults(imported.Result));
|
this.Push(CreateResults(imported.Result));
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
private void fadeOut(bool instant = false)
|
||||||
|
{
|
||||||
|
float fadeOutDuration = instant ? 0 : 250;
|
||||||
|
this.FadeOut(fadeOutDuration);
|
||||||
|
|
||||||
|
Background.EnableUserDim.Value = false;
|
||||||
|
storyboardReplacesBackground.Value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void scheduleGotoRanking()
|
||||||
|
{
|
||||||
|
completionProgressDelegate?.Cancel();
|
||||||
|
completionProgressDelegate = Schedule(GotoRanking);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
namespace osu.Game.Screens.Play
|
||||||
@ -23,6 +24,11 @@ namespace osu.Game.Screens.Play
|
|||||||
DrawableRuleset?.SetReplayScore(score);
|
DrawableRuleset?.SetReplayScore(score);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void GotoRanking()
|
||||||
|
{
|
||||||
|
this.Push(CreateResults(DrawableRuleset.ReplayScore.ScoreInfo));
|
||||||
|
}
|
||||||
|
|
||||||
protected override ScoreInfo CreateScore() => score.ScoreInfo;
|
protected override ScoreInfo CreateScore() => score.ScoreInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user