[DesktopVRIK] Fixed an issue where tracking status would update a frame late

This commit is contained in:
NotAKidoS 2023-07-29 16:49:06 -05:00
parent 02d6c7ec89
commit d3db894acf
6 changed files with 61 additions and 35 deletions

View file

@ -120,4 +120,19 @@ internal class PlayerSetupPatches
DesktopVRIK.Logger.Error(e);
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.Update))]
private static void Postfix_PlayerSetup_Update()
{
try
{
IKManager.Instance?.OnPlayerUpdate();
}
catch (Exception e)
{
DesktopVRIK.Logger.Error($"Error during the patched method {nameof(Postfix_PlayerSetup_Update)}");
DesktopVRIK.Logger.Error(e);
}
}
}