1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

Fix SkinnableSounds not continuing playback on skin change

This commit is contained in:
Dean Herbert 2020-07-22 16:37:53 +09:00
parent c52cddc5d8
commit 3ed40d3a6b

View File

@ -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();
}
}
}