1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Use legacy beatmap combo indices for legacy beatmap skins

This commit is contained in:
Salman Ahmed 2021-05-05 07:36:30 +03:00
parent cd6d070b4a
commit 51ff59242d

View File

@ -6,8 +6,11 @@ using osu.Framework.Bindables;
using osu.Framework.IO.Stores;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Formats;
using osu.Game.IO;
using osu.Game.Rulesets.Objects.Legacy;
using osu.Game.Rulesets.Objects.Types;
using osuTK.Graphics;
namespace osu.Game.Skinning
{
@ -39,6 +42,14 @@ namespace osu.Game.Skinning
return base.GetConfig<TLookup, TValue>(lookup);
}
protected override IBindable<Color4> GetComboColour(IHasComboColours source, int comboIndex, IHasComboInformation combo)
{
if (combo is IHasLegacyBeatmapComboOffset legacyBeatmapCombo)
return base.GetComboColour(source, legacyBeatmapCombo.LegacyBeatmapComboIndex, combo);
return base.GetComboColour(source, comboIndex, combo);
}
public override ISample GetSample(ISampleInfo sampleInfo)
{
if (sampleInfo is ConvertHitObjectParser.LegacyHitSampleInfo legacy && legacy.CustomSampleBank == 0)