mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:25:05 +08:00
Check for zero rate to prevent crashes on unpause
This commit is contained in:
parent
bcaaf25278
commit
4f3f95540b
@ -42,6 +42,10 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
spinner.RotationTracker.Tracking = true;
|
||||
|
||||
// early-return if we were paused to avoid division-by-zero in the subsequent calculations.
|
||||
if (Precision.AlmostEquals(spinner.Clock.Rate, 0))
|
||||
return;
|
||||
|
||||
// because the spinner is under the gameplay clock, it is affected by rate adjustments on the track;
|
||||
// for that reason using ElapsedFrameTime directly leads to fewer SPM with Half Time and more SPM with Double Time.
|
||||
// for spinners we want the real (wall clock) elapsed time; to achieve that, unapply the clock rate locally here.
|
||||
|
Loading…
Reference in New Issue
Block a user