1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 20:43:21 +08:00

Allow use rate adjust to fallback to clock rate adjust

This commit is contained in:
Dean Herbert 2019-03-12 18:14:01 +09:00
parent cdeaa80fea
commit c1a356161f

View File

@ -6,6 +6,7 @@ using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using osu.Framework; using osu.Framework;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
@ -142,7 +143,11 @@ namespace osu.Game.Screens.Play
if (sourceClock == null) return; if (sourceClock == null) return;
sourceClock.ResetSpeedAdjustments(); sourceClock.ResetSpeedAdjustments();
sourceClock.Rate = UserPlaybackRate.Value;
if (sourceClock is IHasTempoAdjust tempo)
tempo.TempoAdjust = UserPlaybackRate.Value;
else
sourceClock.Rate = UserPlaybackRate.Value;
foreach (var mod in beatmap.Mods.Value.OfType<IApplicableToClock>()) foreach (var mod in beatmap.Mods.Value.OfType<IApplicableToClock>())
mod.ApplyToClock(sourceClock); mod.ApplyToClock(sourceClock);