mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 15:17:44 +08:00
cleanup
This commit is contained in:
parent
c8b0220934
commit
0a8ba4bfb5
@ -1102,13 +1102,12 @@ namespace osu.Game.Screens.Edit
|
|||||||
double seekMargin = 0;
|
double seekMargin = 0;
|
||||||
if (clock.IsRunning)
|
if (clock.IsRunning)
|
||||||
{
|
{
|
||||||
seekMargin = 450;
|
IAdjustableClock adjustableClock = clock;
|
||||||
|
seekMargin = 450 * adjustableClock.Rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
IAdjustableClock adjustableClock = clock;
|
|
||||||
|
|
||||||
var found = direction < 1
|
var found = direction < 1
|
||||||
? editorBeatmap.ControlPointInfo.AllControlPoints.LastOrDefault(p => p.Time < clock.CurrentTime - (seekMargin * adjustableClock.Rate))
|
? editorBeatmap.ControlPointInfo.AllControlPoints.LastOrDefault(p => p.Time < clock.CurrentTime - seekMargin)
|
||||||
: editorBeatmap.ControlPointInfo.AllControlPoints.FirstOrDefault(p => p.Time > clock.CurrentTime);
|
: editorBeatmap.ControlPointInfo.AllControlPoints.FirstOrDefault(p => p.Time > clock.CurrentTime);
|
||||||
|
|
||||||
if (found != null)
|
if (found != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user