diff --git a/AlternateIKSystem/HarmonyPatches.cs b/AlternateIKSystem/HarmonyPatches.cs index 86a20bf..e479ca6 100644 --- a/AlternateIKSystem/HarmonyPatches.cs +++ b/AlternateIKSystem/HarmonyPatches.cs @@ -109,6 +109,6 @@ internal class IKSystemPatches private static void Prefix_IKSystem_InitializeAvatar(ref bool __runOriginal) { // Don't setup with native IKSystem - __runOriginal = !ModSettings.EntryEnabled.Value; + __runOriginal &= !ModSettings.EntryEnabled.Value; } } \ No newline at end of file diff --git a/AlternateIKSystem/IK/IKHandlers/IKHandler.cs b/AlternateIKSystem/IK/IKHandlers/IKHandler.cs index 7d54319..66b4fab 100644 --- a/AlternateIKSystem/IK/IKHandlers/IKHandler.cs +++ b/AlternateIKSystem/IK/IKHandlers/IKHandler.cs @@ -32,8 +32,8 @@ internal abstract class IKHandler // Solver Info internal float _scaleDifference = 1f; internal float _locomotionWeight = 1f; - internal float _ikSimulatedRootAngle = 0f; - internal bool _wasTrackingLocomotion = false; + internal float _ikSimulatedRootAngle; + internal bool _wasTrackingLocomotion; #endregion diff --git a/AlternateIKSystem/IK/IKManager.cs b/AlternateIKSystem/IK/IKManager.cs index 279ef4e..70f145f 100644 --- a/AlternateIKSystem/IK/IKManager.cs +++ b/AlternateIKSystem/IK/IKManager.cs @@ -5,7 +5,6 @@ using NAK.AlternateIKSystem.IK.IKHandlers; using NAK.AlternateIKSystem.VRIKHelpers; using RootMotion.FinalIK; using UnityEngine; -using UnityEngine.Events; namespace NAK.AlternateIKSystem.IK; @@ -256,8 +255,8 @@ public class IKManager : MonoBehaviour SetAvatarPose(AvatarPose.Initial); VRIKUtils.ApplyScaleToVRIK(_vrik, _ikHandler._locomotionData, 1f); - _vrik.onPreSolverUpdate.AddListener(new UnityAction(OnPreSolverUpdateGeneral)); - _vrik.onPostSolverUpdate.AddListener(new UnityAction(OnPostSolverUpdateGeneral)); + _vrik.onPreSolverUpdate.AddListener(OnPreSolverUpdateGeneral); + _vrik.onPostSolverUpdate.AddListener(OnPostSolverUpdateGeneral); } #endregion