mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 11:42:58 +08:00
Merge pull request #10817 from peppy/fix-combo-break-sounds
Fix combo break sounds playing during seek
This commit is contained in:
commit
1482b26a94
@ -38,12 +38,21 @@ namespace osu.Game.Screens.Play
|
|||||||
processor.Combo.BindValueChanged(onComboChange);
|
processor.Combo.BindValueChanged(onComboChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Resolved(canBeNull: true)]
|
||||||
|
private ISamplePlaybackDisabler samplePlaybackDisabler { get; set; }
|
||||||
|
|
||||||
private void onComboChange(ValueChangedEvent<int> combo)
|
private void onComboChange(ValueChangedEvent<int> combo)
|
||||||
{
|
{
|
||||||
if (combo.NewValue == 0 && (combo.OldValue > 20 || (alwaysPlay.Value && firstTime)))
|
if (combo.NewValue == 0 && (combo.OldValue > 20 || (alwaysPlay.Value && firstTime)))
|
||||||
{
|
{
|
||||||
comboBreakSample?.Play();
|
|
||||||
firstTime = false;
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user