Fix cosmetic not showing up on main menu when skinNameToHijack is "*"

This commit is contained in:
Terry Hearst 2023-09-09 20:01:12 -04:00
parent cdb2b7b3f4
commit 486a4acc32

View file

@ -17,14 +17,14 @@ namespace CustomCosmeticLoader.Patches
if (!Config.inMainMenu)
return;
if (Config.skinNameToHijack == "*")
return;
if (__instance.cosmeticDisplay)
{
__instance.cosmeticDisplay.Clear();
GameObjectAllocator.Deinitialize(__instance.cosmeticDisplay.gameObject);
__instance.cosmeticDisplay.Setup(Shared.SkinToHijack, CosmeticType.Skin, true, true);
if (Config.skinNameToHijack != "*")
{
__instance.cosmeticDisplay.Clear();
GameObjectAllocator.Deinitialize(__instance.cosmeticDisplay.gameObject);
__instance.cosmeticDisplay.Setup(Shared.SkinToHijack, CosmeticType.Skin, true, true);
}
Shared.ApplyCustomTexture(__instance.cosmeticDisplay.CachedCosmeticGameObject);
}
}