From 2b9157987e6539ca3fcca85762c15c8152598dca Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 2 Sep 2021 19:34:09 +0900 Subject: [PATCH] Fix regression in `SampleControlPoint` add logic --- osu.Game/Beatmaps/Legacy/LegacyControlPointInfo.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/Legacy/LegacyControlPointInfo.cs b/osu.Game/Beatmaps/Legacy/LegacyControlPointInfo.cs index d3c0559ec8..4059cb7c01 100644 --- a/osu.Game/Beatmaps/Legacy/LegacyControlPointInfo.cs +++ b/osu.Game/Beatmaps/Legacy/LegacyControlPointInfo.cs @@ -56,7 +56,9 @@ protected override bool CheckAlreadyExisting(double time, ControlPoint newPoint) switch (newPoint) { case SampleControlPoint _: - return newPoint.IsRedundant(SamplePointAt(time)); + // intentionally don't use SamplePointAt (we always need to consider the first sample point). + var existing = BinarySearch(SamplePoints, time); + return newPoint.IsRedundant(existing); case DifficultyControlPoint _: return newPoint.IsRedundant(DifficultyPointAt(time));