From b096e03a57d57faf775bf2c846d34f0f9358be77 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 6 Jun 2023 16:31:57 +0900 Subject: [PATCH] Fix ticks being created after the end of drum rolls in osu!taiko editor Closes https://github.com/ppy/osu/issues/23135. --- osu.Game.Rulesets.Taiko/Objects/DrumRoll.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Objects/DrumRoll.cs b/osu.Game.Rulesets.Taiko/Objects/DrumRoll.cs index 2f4a98bd8f..987eb6625a 100644 --- a/osu.Game.Rulesets.Taiko/Objects/DrumRoll.cs +++ b/osu.Game.Rulesets.Taiko/Objects/DrumRoll.cs @@ -1,11 +1,10 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using osu.Game.Rulesets.Objects.Types; using System.Threading; using osu.Framework.Bindables; +using osu.Framework.Utils; using osu.Game.Beatmaps; using osu.Game.Beatmaps.ControlPoints; using osu.Game.Beatmaps.Formats; @@ -86,7 +85,10 @@ namespace osu.Game.Rulesets.Taiko.Objects bool first = true; - for (double t = StartTime; t < EndTime + tickSpacing / 2; t += tickSpacing) + // TODO: this implementation of drum roll tick does not match stable. + // Stable uses next-object intrinsics to decide whether the end of a drum roll gets a tick. + // It also changes the rate of ticks based on BPM. This is quite important. + for (double t = StartTime; Precision.AlmostBigger(EndTime, t, 1); t += tickSpacing) { cancellationToken.ThrowIfCancellationRequested();