Merge pull request #18788 from peppy/editor-seek-constant-while-playing

Change editor seek-while-playing modifier to be BPM agnostic
This commit is contained in:
Dean Herbert 2022-06-21 15:28:46 +09:00 committed by GitHub
commit 7d988da2c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -798,10 +798,11 @@ namespace osu.Game.Screens.Edit
if (trackPlaying)
{
// generally users are not looking to perform tiny seeks when the track is playing,
// so seeks should always be by one full beat, bypassing the beatDivisor.
// generally users are not looking to perform tiny seeks when the track is playing.
// this multiplication undoes the division that will be applied in the underlying seek operation.
amount *= beatDivisor.Value;
// scale by BPM to keep the seek amount constant across all BPMs.
var timingPoint = editorBeatmap.ControlPointInfo.TimingPointAt(clock.CurrentTimeAccurate);
amount *= beatDivisor.Value * (timingPoint.BPM / 120);
}
if (direction < 1)