mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 14:59:23 +00:00
[AvatarScaleMod] Fix issue with ClearAvatar() running twice, breaking scale persistance.
This commit is contained in:
parent
05374459be
commit
5c66138f2f
1 changed files with 3 additions and 0 deletions
|
@ -26,6 +26,9 @@ class PlayerSetupPatches
|
|||
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.ClearAvatar))]
|
||||
static void Prefix_PlayerSetup_ClearAvatar(ref PlayerSetup __instance, ref float ____avatarHeight)
|
||||
{
|
||||
// dumb fix cause ClearAvatar() runs twice when switching
|
||||
if (__instance._avatar == null) return;
|
||||
|
||||
if (!AvatarScaleMod.EntryEnabled.Value) return;
|
||||
|
||||
if (!IsSupportedAvatar(__instance.animatorManager) && !AvatarScaleMod.EntryPersistAnyways.Value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue