mirror of https://github.com/ppy/osu
Loop over lookup names on default-samples retrieval
This commit is contained in:
parent
66223b9954
commit
4ef991b973
|
@ -45,10 +45,9 @@ protected override void SkinChanged(ISkinSource skin, bool allowFallback)
|
|||
var ch = skin.GetSample(s);
|
||||
|
||||
if (ch == null && allowFallback)
|
||||
if (s is HitSampleInfo hsi)
|
||||
ch = audio.Samples.Get(string.IsNullOrEmpty(hsi.Namespace)
|
||||
? $"Gameplay/{hsi.Namespace}/{hsi.Bank}-{hsi.Name}"
|
||||
: $"Gameplay/{hsi.Bank}-{hsi.Name}");
|
||||
foreach (var lookup in s.LookupNames)
|
||||
if ((ch = audio.Samples.Get($"Gameplay/{lookup}")) != null)
|
||||
break;
|
||||
|
||||
if (ch != null)
|
||||
ch.Volume.Value = s.Volume / 100.0;
|
||||
|
|
Loading…
Reference in New Issue