public static bool SolverManager_PreLateUpdate(RootMotion.SolverManager __instance)
        {
            if (hScene == null)
            {
                return(true);
            }

            ChaControl character = __instance.GetComponentInParent <ChaControl>();

            if (character == null)
            {
                return(true);
            }

            int charIndex = 1;

            if (character.chaID == (int)ChaID.FirstFemale || character.chaID == (int)ChaID.SecondFemale)
            {
                charIndex = maleCharacters.Count + character.chaID;
            }
            else if (character.chaID == (int)ChaID.FirstMale)
            {
                charIndex = 0;
            }

            if (enableAnimationFixer.Value && solveDependenciesFirst.Value && character.chaID != (int)ChaID.FirstFemale && character.chaID != (int)ChaID.SecondFemale && SliderUI.characterOffsets[charIndex].dependentAnimation)
            {
                return(false);
            }

            if (character.chaID == (int)ChaID.FirstFemale || character.chaID == (int)ChaID.SecondFemale)
            {
                bool leftFootJob  = bFootJobException && (!bTwoFootException || currentMotion.Contains("Idle") || currentMotion.Contains("WLoop"));
                bool rightFootJob = bFootJobException && bTwoFootException && currentMotion.Contains("O");
                SliderUI.ApplyLimbOffsets(charIndex, useLastSolutionForFemales.Value, useReplacements, leftFootJob, rightFootJob);
            }
            else
            {
                SliderUI.ApplyLimbOffsets(charIndex, useLastSolutionForMales.Value, useReplacements, false, false);
            }
            return(true);
        }
        public static void SolverManager_PostLateUpdate(RootMotion.SolverManager __instance)
        {
            if (hScene == null || !enableAnimationFixer.Value || !solveDependenciesFirst.Value)
            {
                return;
            }

            ChaControl character = __instance.GetComponentInParent <ChaControl>();

            if (character == null || character.chaID != (int)ChaID.FirstFemale)
            {
                return;
            }

            for (var charIndex = 0; charIndex < maleCharacters.Count; charIndex++)
            {
                if (SliderUI.characterOffsets[charIndex].dependentAnimation)
                {
                    SliderUI.ApplyLimbOffsets(charIndex, useLastSolutionForMales.Value, useReplacements, false, false);
                    maleCharacters[charIndex].fullBodyIK.UpdateSolverExternal();
                }
            }
        }