[DesktopVRIK] Changed patch location to be compatible with AvatarScaleMod.

This commit is contained in:
NotAKidoS 2023-09-23 19:40:14 -05:00
parent d1547e2e92
commit 71fa8a9c56

View file

@ -37,19 +37,19 @@ internal class PlayerSetupPatches
} }
[HarmonyPostfix] [HarmonyPostfix]
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.SetupAvatar))] [HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.SetupAvatarDesktop))]
private static void Postfix_PlayerSetup_SetupAvatar(GameObject inAvatar) private static void Postfix_PlayerSetup_SetupAvatarDesktop(ref PlayerSetup __instance)
{ {
if (!ModSettings.EntryEnabled.Value) if (!ModSettings.EntryEnabled.Value)
return; return;
try try
{ {
IKManager.Instance?.OnAvatarInitialized(inAvatar); IKManager.Instance?.OnAvatarInitialized(__instance._avatar);
} }
catch (Exception e) catch (Exception e)
{ {
DesktopVRIK.Logger.Error($"Error during the patched method {nameof(Postfix_PlayerSetup_SetupAvatar)}"); DesktopVRIK.Logger.Error($"Error during the patched method {nameof(Postfix_PlayerSetup_SetupAvatarDesktop)}");
DesktopVRIK.Logger.Error(e); DesktopVRIK.Logger.Error(e);
} }
} }