1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 20:56:12 +08:00

HasStoryboardEnded doesn't trigger updateCompletionState()

Scores won't be shown prematurely if the storyboard ends before the playable portion of the beatmap.
This commit is contained in:
Christine Chen 2021-04-17 21:49:07 -04:00
parent 97bacbdc76
commit c77f838fb0

View File

@ -284,14 +284,16 @@ namespace osu.Game.Screens.Play
ScoreProcessor.RevertResult(r);
};
DimmableStoryboard.HasStoryboardEnded.ValueChanged += _ =>
{
if (ScoreProcessor.HasCompleted.Value)
scheduleCompletion();
};
// Bind the judgement processors to ourselves
ScoreProcessor.HasCompleted.ValueChanged += updateCompletionState;
HealthProcessor.Failed += onFail;
// Keep track of whether the storyboard ended after the playable portion
if (DimmableStoryboard.HasStoryboardEnded != null)
DimmableStoryboard.HasStoryboardEnded.ValueChanged += updateCompletionState;
foreach (var mod in Mods.Value.OfType<IApplicableToScoreProcessor>())
mod.ApplyToScoreProcessor(ScoreProcessor);
@ -630,7 +632,7 @@ namespace osu.Game.Screens.Play
return score.ScoreInfo;
});
var storyboardHasOutro = DimmableStoryboard.ContentDisplayed && (!DimmableStoryboard.HasStoryboardEnded?.Value ?? false);
var storyboardHasOutro = DimmableStoryboard.ContentDisplayed && !DimmableStoryboard.HasStoryboardEnded.Value;
if (storyboardHasOutro)
{