mirror of
https://github.com/ppy/osu
synced 2024-12-29 10:22:43 +00:00
Merge pull request #10521 from peppy/fix-editor-seek-interval-when-playing
Fix editor not seeking by full beat when track is playing
This commit is contained in:
commit
829241a9f0
@ -597,10 +597,20 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
double amount = e.ShiftPressed ? 4 : 1;
|
||||
|
||||
bool trackPlaying = clock.IsRunning;
|
||||
|
||||
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.
|
||||
// this multiplication undoes the division that will be applied in the underlying seek operation.
|
||||
amount *= beatDivisor.Value;
|
||||
}
|
||||
|
||||
if (direction < 1)
|
||||
clock.SeekBackward(!clock.IsRunning, amount);
|
||||
clock.SeekBackward(!trackPlaying, amount);
|
||||
else
|
||||
clock.SeekForward(!clock.IsRunning, amount);
|
||||
clock.SeekForward(!trackPlaying, amount);
|
||||
}
|
||||
|
||||
private void exportBeatmap()
|
||||
|
Loading…
Reference in New Issue
Block a user