1
0
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:
iiSaLMaN 2019-08-27 19:42:17 +03:00
parent 66223b9954
commit 4ef991b973

View File

@ -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;