diff --git a/osu.Game.Rulesets.Mania/Objects/HoldNote.cs b/osu.Game.Rulesets.Mania/Objects/HoldNote.cs index 3550d561c1..3d988d9dda 100644 --- a/osu.Game.Rulesets.Mania/Objects/HoldNote.cs +++ b/osu.Game.Rulesets.Mania/Objects/HoldNote.cs @@ -61,11 +61,6 @@ namespace osu.Game.Rulesets.Mania.Objects tickSpacing = timingPoint.BeatLength / difficulty.SliderTickRate; } - /// - /// Total number of hold note ticks. - /// - public int TotalTicks => Ticks.Count(); - /// /// The scoring scoring ticks of the hold note. /// diff --git a/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs b/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs index ebf99206ee..798d4b8c5b 100644 --- a/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs +++ b/osu.Game.Rulesets.Mania/Scoring/ManiaScoreProcessor.cs @@ -2,6 +2,7 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; +using System.Linq; using osu.Game.Beatmaps; using osu.Game.Database; using osu.Game.Rulesets.Mania.Judgements; @@ -170,6 +171,8 @@ namespace osu.Game.Rulesets.Mania.Scoring { foreach (var obj in beatmap.HitObjects) { + var holdNote = obj as HoldNote; + if (obj is Note) { AddJudgement(new ManiaJudgement @@ -178,7 +181,7 @@ namespace osu.Game.Rulesets.Mania.Scoring ManiaResult = ManiaHitResult.Perfect }); } - else if (obj is HoldNote) + else if (holdNote != null) { // Head AddJudgement(new ManiaJudgement @@ -188,7 +191,8 @@ namespace osu.Game.Rulesets.Mania.Scoring }); // Ticks - for (int i = 0; i < ((HoldNote)obj).TotalTicks; i++) + int tickCount = holdNote.Ticks.Count(); + for (int i = 0; i < tickCount; i++) { AddJudgement(new HoldNoteTickJudgement {