diff --git a/osu.Game.Rulesets.Osu.Tests/OsuBeatmapConversionTest.cs b/osu.Game.Rulesets.Osu.Tests/OsuBeatmapConversionTest.cs index ea07b69e78..3e0a86d39c 100644 --- a/osu.Game.Rulesets.Osu.Tests/OsuBeatmapConversionTest.cs +++ b/osu.Game.Rulesets.Osu.Tests/OsuBeatmapConversionTest.cs @@ -39,6 +39,14 @@ protected override IEnumerable CreateConvertValue(HitObject hitObj foreach (var nested in slider.NestedHitObjects) objects.Add(createConvertValue((OsuHitObject)nested, slider)); + // stable does slider tail leniency by offsetting the last tick 36ms back. + // based on player feedback, we're doing this a little different in lazer, + // and the lazer method does not require offsetting the last tick + // (see `DrawableSliderTail.CheckForResult()`). + // however, in conversion tests, just so the output matches, we're bringing + // the 36ms offset back locally. + // in particular, on some sliders, this may rearrange nested objects, + // so we sort them again by start time to prevent test failures. foreach (var obj in objects.OrderBy(cv => cv.StartTime)) yield return obj; @@ -55,6 +63,10 @@ static ConvertValue createConvertValue(OsuHitObject obj, OsuHitObject? parent = double startTime = obj.StartTime; double endTime = obj.GetEndTime(); + // as stated in the inline comment above, this is locally bringing back + // the stable treatment of the "legacy last tick" just to make sure + // that the conversion output matches. + // compare: `SliderEventGenerator.Generate()`, and the calculation of `legacyLastTickTime`. if (obj is SliderTailCircle && parent is Slider slider) { startTime = Math.Max(startTime + SliderEventGenerator.TAIL_LENIENCY, slider.StartTime + slider.Duration / 2);