mirror of
https://github.com/ppy/osu
synced 2025-02-17 19:07:07 +00:00
Add more comprehensive commenting and simplify base call logic
We can call the base method regardless for better safety. Worst case it's just going to run `Stop()` twice anyway.
This commit is contained in:
parent
ee89aa159c
commit
05982f42ab
@ -46,14 +46,15 @@ namespace osu.Game.Storyboards.Drawables
|
|||||||
{
|
{
|
||||||
if (!RequestedPlaying) return;
|
if (!RequestedPlaying) return;
|
||||||
|
|
||||||
// non-looping storyboard samples should be stopped immediately when sample playback is disabled
|
if (!Looping && disabled.NewValue)
|
||||||
if (!Looping)
|
|
||||||
{
|
{
|
||||||
if (disabled.NewValue)
|
// the default behaviour for sample disabling is to allow one-shot samples to play out.
|
||||||
Stop();
|
// storyboards regularly have long running samples that can cause this behaviour to lead to unintended results.
|
||||||
|
// for this reason, we immediately stop such samples.
|
||||||
|
Stop();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
base.SamplePlaybackDisabledChanged(disabled);
|
base.SamplePlaybackDisabledChanged(disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
|
Loading…
Reference in New Issue
Block a user