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

Consider not adding legacy skin transformers to non-legacy skins

This commit is contained in:
Salman Ahmed 2021-06-16 16:51:20 +03:00
parent 5ebf570ec4
commit 52ddf08532

View File

@ -12,7 +12,7 @@ namespace osu.Game.Skinning
{
/// <summary>
/// A type of <see cref="SkinProvidingContainer"/> that provides access to the beatmap skin and user skin,
/// each transformed with the ruleset's own skin transformer individually.
/// with each legacy skin source transformed with the ruleset's legacy skin transformer.
/// </summary>
public class RulesetSkinProvidingContainer : SkinProvidingContainer
{
@ -66,7 +66,7 @@ namespace osu.Game.Skinning
protected ISkin GetRulesetTransformedSkin(ISkin skin)
{
if (skin == null)
if (!(skin is LegacySkin))
return null;
var rulesetTransformed = Ruleset.CreateLegacySkinProvider(skin, Beatmap);