mirror of https://github.com/ppy/osu
Store tick count locally, remove HoldNote TickCount.
This commit is contained in:
parent
f17b8acd13
commit
44f1d906ea
|
@ -61,11 +61,6 @@ public override void ApplyDefaults(ControlPointInfo controlPointInfo, BeatmapDif
|
|||
tickSpacing = timingPoint.BeatLength / difficulty.SliderTickRate;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Total number of hold note ticks.
|
||||
/// </summary>
|
||||
public int TotalTicks => Ticks.Count();
|
||||
|
||||
/// <summary>
|
||||
/// The scoring scoring ticks of the hold note.
|
||||
/// </summary>
|
||||
|
|
|
@ -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 @@ protected override void ComputeTargets(Beatmap<ManiaHitObject> beatmap)
|
|||
{
|
||||
foreach (var obj in beatmap.HitObjects)
|
||||
{
|
||||
var holdNote = obj as HoldNote;
|
||||
|
||||
if (obj is Note)
|
||||
{
|
||||
AddJudgement(new ManiaJudgement
|
||||
|
@ -178,7 +181,7 @@ protected override void ComputeTargets(Beatmap<ManiaHitObject> beatmap)
|
|||
ManiaResult = ManiaHitResult.Perfect
|
||||
});
|
||||
}
|
||||
else if (obj is HoldNote)
|
||||
else if (holdNote != null)
|
||||
{
|
||||
// Head
|
||||
AddJudgement(new ManiaJudgement
|
||||
|
@ -188,7 +191,8 @@ protected override void ComputeTargets(Beatmap<ManiaHitObject> beatmap)
|
|||
});
|
||||
|
||||
// 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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue