mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Merge pull request #9645 from peppy/fix-skinnable-sound-contianuance
Fix SkinnableSounds not continuing playback on skin change
This commit is contained in:
commit
860f10ceee
@ -98,6 +98,8 @@ namespace osu.Game.Skinning
|
||||
|
||||
protected override void SkinChanged(ISkinSource skin, bool allowFallback)
|
||||
{
|
||||
bool wasPlaying = samplesContainer.Any(s => s.Playing);
|
||||
|
||||
var channels = hitSamples.Select(s =>
|
||||
{
|
||||
var ch = skin.GetSample(s);
|
||||
@ -121,6 +123,9 @@ namespace osu.Game.Skinning
|
||||
}).Where(c => c != null);
|
||||
|
||||
samplesContainer.ChildrenEnumerable = channels.Select(c => new DrawableSample(c));
|
||||
|
||||
if (wasPlaying)
|
||||
Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user