From fcf47267fd3a38e53794ca8dadd0d6222c327b64 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 21 Dec 2023 00:48:46 +0900 Subject: [PATCH] Revert change to `OsuHitWindows` and move logic local to pooling initialisation --- osu.Game.Rulesets.Osu/Scoring/OsuHitWindows.cs | 2 -- osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs | 18 +++++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Scoring/OsuHitWindows.cs b/osu.Game.Rulesets.Osu/Scoring/OsuHitWindows.cs index 5b2c95b536..fd86e0eeda 100644 --- a/osu.Game.Rulesets.Osu/Scoring/OsuHitWindows.cs +++ b/osu.Game.Rulesets.Osu/Scoring/OsuHitWindows.cs @@ -28,8 +28,6 @@ namespace osu.Game.Rulesets.Osu.Scoring case HitResult.Ok: case HitResult.Meh: case HitResult.Miss: - case HitResult.LargeTickMiss: - case HitResult.IgnoreMiss: return true; } diff --git a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs index 3f60ce3610..c94057cf6d 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuPlayfield.cs @@ -20,7 +20,6 @@ using osu.Game.Rulesets.Osu.Configuration; using osu.Game.Rulesets.Osu.Objects; using osu.Game.Rulesets.Osu.Objects.Drawables; using osu.Game.Rulesets.Osu.Objects.Drawables.Connections; -using osu.Game.Rulesets.Osu.Scoring; using osu.Game.Rulesets.Osu.UI.Cursor; using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.UI; @@ -66,8 +65,21 @@ namespace osu.Game.Rulesets.Osu.UI HitPolicy = new StartTimeOrderedHitPolicy(); - var hitWindows = new OsuHitWindows(); - foreach (var result in Enum.GetValues().Where(r => r > HitResult.None && hitWindows.IsHitResultAllowed(r))) + foreach (var result in Enum.GetValues().Where(r => + { + switch (r) + { + case HitResult.Great: + case HitResult.Ok: + case HitResult.Meh: + case HitResult.Miss: + case HitResult.LargeTickMiss: + case HitResult.IgnoreMiss: + return true; + } + + return false; + })) poolDictionary.Add(result, new DrawableJudgementPool(result, onJudgementLoaded)); AddRangeInternal(poolDictionary.Values);