From 43626573df0308b599d32499feb65458dc883277 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 13 Nov 2020 13:15:54 +0900 Subject: [PATCH] Fix combo break sounds playing when seeking --- osu.Game/Screens/Play/ComboEffects.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/ComboEffects.cs b/osu.Game/Screens/Play/ComboEffects.cs index 831b2f593c..f22fd541d0 100644 --- a/osu.Game/Screens/Play/ComboEffects.cs +++ b/osu.Game/Screens/Play/ComboEffects.cs @@ -38,12 +38,21 @@ protected override void LoadComplete() processor.Combo.BindValueChanged(onComboChange); } + [Resolved(canBeNull: true)] + private ISamplePlaybackDisabler samplePlaybackDisabler { get; set; } + private void onComboChange(ValueChangedEvent combo) { if (combo.NewValue == 0 && (combo.OldValue > 20 || (alwaysPlay.Value && firstTime))) { - comboBreakSample?.Play(); firstTime = false; + + // combo break isn't a pausable sound itself as we want to let it play out. + // we still need to disable during seeks, though. + if (samplePlaybackDisabler?.SamplePlaybackDisabled.Value == true) + return; + + comboBreakSample?.Play(); } } }