Standardise control point search logic in OverlappingScrollAlgorithm

Was using a very local algorithm which I cannot guarantee is correct.
I'd rather it just use the one used everywhere else.
This commit is contained in:
Dean Herbert
2022-10-18 16:01:04 +09:00
parent ccbac08985
commit ec3761ced9
8 changed files with 35 additions and 43 deletions

View File

@ -158,9 +158,9 @@ namespace osu.Game.Rulesets.UI.Scrolling
// Trim unwanted sequences of timing changes
timingChanges = timingChanges
// Collapse sections after the last hit object
.Where(s => s.StartTime <= lastObjectTime)
.Where(s => s.Time <= lastObjectTime)
// Collapse sections with the same start time
.GroupBy(s => s.StartTime).Select(g => g.Last()).OrderBy(s => s.StartTime);
.GroupBy(s => s.Time).Select(g => g.Last()).OrderBy(s => s.Time);
ControlPoints.AddRange(timingChanges);