mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 05:32:54 +08:00
fix legacy parser incorrectly assigning sample info for sliders
This commit is contained in:
parent
f7c84030ac
commit
ffcc8e91b2
@ -92,7 +92,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
}
|
||||
|
||||
if (split.Length > 10)
|
||||
readCustomSampleBanks(split[10], bankInfo);
|
||||
readCustomSampleBanks(split[10], bankInfo, true);
|
||||
|
||||
// One node for each repeat + the start and end nodes
|
||||
int nodes = repeatCount + 2;
|
||||
@ -182,7 +182,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
return result;
|
||||
}
|
||||
|
||||
private void readCustomSampleBanks(string str, SampleBankInfo bankInfo)
|
||||
private void readCustomSampleBanks(string str, SampleBankInfo bankInfo, bool banksOnly = false)
|
||||
{
|
||||
if (string.IsNullOrEmpty(str))
|
||||
return;
|
||||
@ -202,6 +202,8 @@ namespace osu.Game.Rulesets.Objects.Legacy
|
||||
bankInfo.BankForNormal = stringBank;
|
||||
bankInfo.BankForAdditions = string.IsNullOrEmpty(stringAddBank) ? stringBank : stringAddBank;
|
||||
|
||||
if (banksOnly) return;
|
||||
|
||||
if (split.Length > 2)
|
||||
bankInfo.CustomSampleBank = Parsing.ParseInt(split[2]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user