1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 18:23:23 +08:00

Fix potentially incorrect custom sample bank

This commit is contained in:
smoogipoo 2019-12-16 17:12:31 +09:00
parent 8beb6b534f
commit be7b00cc34

View File

@ -332,7 +332,7 @@ namespace osu.Game.Beatmaps.Formats
if (!banksOnly) if (!banksOnly)
{ {
string customSampleBank = toLegacyCustomSampleBank(samples.FirstOrDefault()?.Suffix); string customSampleBank = toLegacyCustomSampleBank(samples.FirstOrDefault(s => !string.IsNullOrEmpty(s.Name))?.Suffix);
string sampleFilename = samples.FirstOrDefault(s => string.IsNullOrEmpty(s.Name))?.LookupNames.First() ?? string.Empty; string sampleFilename = samples.FirstOrDefault(s => string.IsNullOrEmpty(s.Name))?.LookupNames.First() ?? string.Empty;
int volume = samples.FirstOrDefault()?.Volume ?? 100; int volume = samples.FirstOrDefault()?.Volume ?? 100;