1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Try retrieving samples without bank names

Fallback for spinner bonus samples
This commit is contained in:
iiSaLMaN 2019-08-21 15:14:33 +03:00
parent 04178058fb
commit 87f3184fcc

View File

@ -55,8 +55,16 @@ namespace osu.Game.Skinning
foreach (var lookup in info.LookupNames)
{
var ch = getSampleFunction($"Gameplay/{lookup}");
if (ch == null)
continue;
{
// Try fallback to non-bank samples.
var bank = lookup.Split('/').Last().Split('-')[0] + '-';
ch = getSampleFunction($"Gameplay/{lookup.Replace(bank, "")}");
if (ch == null)
continue;
}
ch.Volume.Value = info.Volume / 100.0;
return ch;