From 25ba3f2dc6ef7a36b3917c636e4fecc61d9966ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Fri, 19 Dec 2025 13:11:07 +0100 Subject: [PATCH] Fix yet another incorrect threshold check in stacking code --- osu.Game.Rulesets.Osu.Tests/OsuBeatmapConversionTest.cs | 2 +- osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapProcessor.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Osu.Tests/OsuBeatmapConversionTest.cs b/osu.Game.Rulesets.Osu.Tests/OsuBeatmapConversionTest.cs index aaff1a2554..2b7ae143d8 100644 --- a/osu.Game.Rulesets.Osu.Tests/OsuBeatmapConversionTest.cs +++ b/osu.Game.Rulesets.Osu.Tests/OsuBeatmapConversionTest.cs @@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Osu.Tests [TestCase("multi-segment-slider")] [TestCase("nan-slider")] [TestCase("1124896")] - // [TestCase("1341554")] TODO: investigate later + [TestCase("1341554")] [TestCase("2593923")] // [TestCase("2730824")] TODO: investigate later // [TestCase("4235513")] TODO: investigate later diff --git a/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapProcessor.cs b/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapProcessor.cs index bbe28817a0..0566b7f334 100644 --- a/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapProcessor.cs +++ b/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapProcessor.cs @@ -151,7 +151,10 @@ namespace osu.Game.Rulesets.Osu.Beatmaps double endTime = objectN.GetEndTime(); - if (objectI.StartTime - endTime > stackThreshold) + // truncation to integer is required to match stable + // compare https://github.com/peppy/osu-stable-reference/blob/08e3dafd525934cf48880b08e91c24ce4ad8b761/osu!/GameplayElements/HitObjectManager.cs#L1725 + // - both quantities being subtracted there are integers + if ((int)objectI.StartTime - (int)endTime > stackThreshold) // We are no longer within stacking range of the previous object. break;