From 3b5b7b2f880152dcd5d4bc2e99fc61e79830a6f1 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 29 May 2024 22:57:17 +0900 Subject: [PATCH] Fix the majority of cases where gameplay stil doesn't end due to judgement count mismatch --- osu.Game/Screens/Edit/GameplayTest/EditorPlayer.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game/Screens/Edit/GameplayTest/EditorPlayer.cs b/osu.Game/Screens/Edit/GameplayTest/EditorPlayer.cs index c327ae185d..836f718f81 100644 --- a/osu.Game/Screens/Edit/GameplayTest/EditorPlayer.cs +++ b/osu.Game/Screens/Edit/GameplayTest/EditorPlayer.cs @@ -69,9 +69,9 @@ namespace osu.Game.Screens.Edit.GameplayTest { var frame = new ReplayFrame { Header = new FrameHeader(new ScoreInfo(), new ScoreProcessorStatistics()) }; - foreach (var hitObject in enumerateHitObjects(DrawableRuleset.Objects.Where(h => h.StartTime < editorState.Time))) + foreach (var hitObject in enumerateHitObjects(DrawableRuleset.Objects, editorState.Time)) { - var judgement = hitObject.CreateJudgement(); + var judgement = hitObject.Judgement; frame.Header.Statistics.TryAdd(judgement.MaxResult, 0); frame.Header.Statistics[judgement.MaxResult]++; @@ -80,11 +80,11 @@ namespace osu.Game.Screens.Edit.GameplayTest HealthProcessor.ResetFromReplayFrame(frame); ScoreProcessor.ResetFromReplayFrame(frame); - static IEnumerable enumerateHitObjects(IEnumerable hitObjects) + static IEnumerable enumerateHitObjects(IEnumerable hitObjects, double cutoffTime) { - foreach (var hitObject in hitObjects) + foreach (var hitObject in hitObjects.Where(h => h.GetEndTime() < cutoffTime)) { - foreach (var nested in enumerateHitObjects(hitObject.NestedHitObjects)) + foreach (var nested in enumerateHitObjects(hitObject.NestedHitObjects, cutoffTime)) yield return nested; yield return hitObject;