From 23f38902931ca1e7afffaa1dde1b26008f755090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 5 Nov 2024 11:56:19 +0100 Subject: [PATCH] Fix effect point scroll speeds below 0.1x not being encoded properly Closes https://github.com/ppy/osu/issues/30472. Caused by mismatching bounds between https://github.com/ppy/osu/blob/2bd12e14dbc7fd6fe29c6db53923c7da1d4b7557/osu.Game/Beatmaps/ControlPoints/EffectControlPoint.cs#L22-L26 and https://github.com/ppy/osu/blob/2bd12e14dbc7fd6fe29c6db53923c7da1d4b7557/osu.Game/Beatmaps/ControlPoints/DifficultyControlPoint.cs#L21-L28 --- osu.Game/Beatmaps/Formats/LegacyBeatmapEncoder.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/Formats/LegacyBeatmapEncoder.cs b/osu.Game/Beatmaps/Formats/LegacyBeatmapEncoder.cs index c14648caf6..956d004602 100644 --- a/osu.Game/Beatmaps/Formats/LegacyBeatmapEncoder.cs +++ b/osu.Game/Beatmaps/Formats/LegacyBeatmapEncoder.cs @@ -183,7 +183,17 @@ namespace osu.Game.Beatmaps.Formats if (scrollSpeedEncodedAsSliderVelocity) { foreach (var point in legacyControlPoints.EffectPoints) - legacyControlPoints.Add(point.Time, new DifficultyControlPoint { SliderVelocity = point.ScrollSpeed }); + { + legacyControlPoints.Add(point.Time, new DifficultyControlPoint + { + SliderVelocityBindable = + { + MinValue = point.ScrollSpeedBindable.MinValue, + MaxValue = point.ScrollSpeedBindable.MaxValue, + Value = point.ScrollSpeedBindable.Value, + } + }); + } } LegacyControlPointProperties lastControlPointProperties = new LegacyControlPointProperties();