Fix regression in `SampleControlPoint` add logic

This commit is contained in:
Dean Herbert 2021-09-02 19:34:09 +09:00
parent 1aff4c2238
commit 2b9157987e
1 changed files with 3 additions and 1 deletions

View File

@ -56,7 +56,9 @@ protected override bool CheckAlreadyExisting(double time, ControlPoint newPoint)
switch (newPoint) switch (newPoint)
{ {
case SampleControlPoint _: 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 _: case DifficultyControlPoint _:
return newPoint.IsRedundant(DifficultyPointAt(time)); return newPoint.IsRedundant(DifficultyPointAt(time));