1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 11:12:55 +08:00

fix seeking back on control points

This commit is contained in:
TaterToes 2024-10-17 16:26:13 -04:00 committed by GitHub
parent 3bcd6b9af5
commit 3fe0791298
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1098,6 +1098,13 @@ namespace osu.Game.Screens.Edit
private void seekControlPoint(int direction)
{
// Gives 350 ms margin to seek back after last control point
double seekMargin = 0;
if (clock.IsRunning)
{
seekMargin = 350;
}
var found = direction < 1
? editorBeatmap.ControlPointInfo.AllControlPoints.LastOrDefault(p => p.Time < clock.CurrentTime)
: editorBeatmap.ControlPointInfo.AllControlPoints.FirstOrDefault(p => p.Time > clock.CurrentTime);