1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 23:12:56 +08:00

Fix potentially adding the same skin multiple times

This commit is contained in:
Salman Ahmed 2021-06-11 17:55:07 +03:00
parent d6d87e1975
commit b6947c25ec

View File

@ -57,10 +57,11 @@ namespace osu.Game.Skinning
SkinSources.Add(GetRulesetTransformedSkin(skinManager.CurrentSkin.Value));
// TODO: we also want to return a DefaultLegacySkin here if the current *beatmap* is providing any skinned elements.
if (skinManager.CurrentSkin.Value is LegacySkin)
if (skinManager.CurrentSkin.Value is LegacySkin && skinManager.CurrentSkin.Value != skinManager.DefaultLegacySkin)
SkinSources.Add(GetRulesetTransformedSkin(skinManager.DefaultLegacySkin));
SkinSources.Add(GetRulesetTransformedSkin(skinManager.DefaultSkin));
if (skinManager.CurrentSkin.Value != skinManager.DefaultSkin)
SkinSources.Add(GetRulesetTransformedSkin(skinManager.DefaultSkin));
}
protected ISkin GetRulesetTransformedSkin(ISkin skin)