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

Ensure ScoreProcessor is still hooked up in special case

This commit is contained in:
Dean Herbert 2021-06-01 16:24:38 +09:00
parent 3ba0d29108
commit 790f1dacc9

View File

@ -51,12 +51,16 @@ namespace osu.Game.Tests.Visual
protected override void PrepareReplay()
{
var replayGeneratingMod = Mods.Value.OfType<ICreateReplay>().FirstOrDefault();
var autoplayMod = Mods.Value.OfType<ModAutoplay>().FirstOrDefault();
if (replayGeneratingMod != null)
// This logic should really not exist (and tests should be instantiating a ReplayPlayer), but a lot of base work is required to make that happen.
if (autoplayMod != null)
{
// This logic should really not exist (and tests should be instantiating a ReplayPlayer), but a lot of base work is required to make that happen.
DrawableRuleset?.SetReplayScore(replayGeneratingMod.CreateReplayScore(GameplayBeatmap.PlayableBeatmap, Mods.Value));
var replayScore = autoplayMod.CreateReplayScore(GameplayBeatmap.PlayableBeatmap, Mods.Value);
DrawableRuleset?.SetReplayScore(replayScore);
ScoreProcessor.NewJudgement += result => ScoreProcessor.PopulateScore(replayScore.ScoreInfo);
return;
}