mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:02:55 +08:00
Loop over lookup names on default-samples retrieval
This commit is contained in:
parent
66223b9954
commit
4ef991b973
@ -45,10 +45,9 @@ namespace osu.Game.Skinning
|
||||
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
Block a user