mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 23:43:03 +08:00
Use time=0 as for the first control point
This commit is contained in:
parent
e333831c45
commit
81fed4c6bf
@ -93,8 +93,10 @@ namespace osu.Game.Beatmaps
|
||||
if (t.Time > lastTime)
|
||||
return (beatLength: t.BeatLength, 0);
|
||||
|
||||
double currentTime = i == 0 ? 0 : t.Time;
|
||||
double nextTime = i == ControlPointInfo.TimingPoints.Count - 1 ? lastTime : ControlPointInfo.TimingPoints[i + 1].Time;
|
||||
return (beatLength: t.BeatLength, duration: nextTime - t.Time);
|
||||
|
||||
return (beatLength: t.BeatLength, duration: nextTime - currentTime);
|
||||
})
|
||||
// Aggregate durations into a set of (beatLength, duration) tuples for each beat length
|
||||
.GroupBy(t => Math.Round(t.beatLength * 1000) / 1000)
|
||||
|
Loading…
Reference in New Issue
Block a user