From e58488d04a64acb9a08cee6253da5973d2c2c9bd Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 15 Jul 2023 11:19:34 +0900 Subject: [PATCH] Fix incorrect comparer implementation --- .../Scoring/ManiaScoreProcessor.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs b/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs index 16e10006e3..c53f3c3e07 100644 --- a/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs +++ b/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs @@ -48,14 +48,13 @@ namespace osu.Game.Rulesets.Mania.Scoring if (result != 0) return result; - var xNote = x as Note; - var yNote = y as Note; - // due to the way input is handled in mania, notes take precedence over ticks in judging order. - if (xNote != null && yNote == null) return -1; - if (xNote == null && yNote != null) return 1; + if (x is Note && y is not Note) return -1; + if (x is not Note && y is Note) return 1; - return xNote!.Column.CompareTo(yNote!.Column); + return x is ManiaHitObject maniaX && y is ManiaHitObject maniaY + ? maniaX.Column.CompareTo(maniaY.Column) + : 0; } } }