mirror of https://github.com/ppy/osu
Fix regression in `SampleControlPoint` add logic
This commit is contained in:
parent
1aff4c2238
commit
2b9157987e
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue