mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-04 10:59:22 +00:00
Rework of IK override
This commit is contained in:
parent
4e3d5dd6d4
commit
49b72a0711
5 changed files with 158 additions and 30 deletions
|
@ -13,6 +13,7 @@ namespace ml_amt
|
|||
ms_instance = this;
|
||||
|
||||
Settings.Init();
|
||||
Settings.IKOverrideChange += this.OnIKOverrideChange;
|
||||
Settings.CrouchLimitChange += this.OnCrouchLimitChange;
|
||||
|
||||
HarmonyInstance.Patch(
|
||||
|
@ -35,8 +36,16 @@ namespace ml_amt
|
|||
yield return null;
|
||||
|
||||
m_localTweaker = PlayerSetup.Instance.gameObject.AddComponent<MotionTweaker>();
|
||||
m_localTweaker.SetIKOverride(Settings.IKOverride);
|
||||
m_localTweaker.SetCrouchLimit(Settings.CrouchLimit);
|
||||
}
|
||||
|
||||
|
||||
void OnIKOverrideChange(bool p_state)
|
||||
{
|
||||
if(m_localTweaker != null)
|
||||
m_localTweaker.SetIKOverride(p_state);
|
||||
}
|
||||
void OnCrouchLimitChange(float p_value)
|
||||
{
|
||||
if(m_localTweaker != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue