mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-03 18:39:23 +00:00
Pose transitions in FBT with enabled game's option for running FBT animations
Limit movement drag to 50 Settings listener on destroy
This commit is contained in:
parent
327f5d6cdd
commit
fe5e1dfd3c
6 changed files with 28 additions and 11 deletions
|
@ -1,4 +1,5 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core.Savior;
|
||||
using ABI_RC.Systems.IK;
|
||||
using ABI_RC.Systems.IK.SubSystems;
|
||||
using ABI_RC.Systems.MovementSystem;
|
||||
|
@ -37,6 +38,7 @@ namespace ml_amt
|
|||
Transform m_avatarHips = null;
|
||||
float m_viewPointHeight = 1f;
|
||||
bool m_inVR = false;
|
||||
bool m_fbtAnimations = true;
|
||||
|
||||
bool m_avatarReady = false;
|
||||
bool m_compatibleAvatar = false;
|
||||
|
@ -93,6 +95,9 @@ namespace ml_amt
|
|||
Settings.FollowHipsChange += this.SetFollowHips;
|
||||
Settings.MassCenterChange += this.OnMassCenterChange;
|
||||
Settings.ScaledStepsChange += this.OnScaledStepsChange;
|
||||
|
||||
m_fbtAnimations = MetaPort.Instance.settings.GetSettingsBool("GeneralEnableRunningAnimationFullBody");
|
||||
MetaPort.Instance.settings.settingBoolChanged.AddListener(this.OnGameSettingBoolChange);
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
|
@ -108,6 +113,8 @@ namespace ml_amt
|
|||
Settings.DetectEmotesChange -= this.SetDetectEmotes;
|
||||
Settings.FollowHipsChange -= this.SetFollowHips;
|
||||
Settings.MassCenterChange -= this.OnMassCenterChange;
|
||||
|
||||
MetaPort.Instance.settings.settingBoolChanged.RemoveListener(this.OnGameSettingBoolChange);
|
||||
}
|
||||
|
||||
void Update()
|
||||
|
@ -147,8 +154,8 @@ namespace ml_amt
|
|||
|
||||
if(m_poseTransitions)
|
||||
{
|
||||
PlayerSetup.Instance.animatorManager.SetAnimatorParameterBool("Crouching", (m_poseState == PoseState.Crouching) && !m_compatibleAvatar && !BodySystem.isCalibratedAsFullBody);
|
||||
PlayerSetup.Instance.animatorManager.SetAnimatorParameterBool("Prone", (m_poseState == PoseState.Proning) && !m_compatibleAvatar && !BodySystem.isCalibratedAsFullBody);
|
||||
PlayerSetup.Instance.animatorManager.SetAnimatorParameterBool("Crouching", (m_poseState == PoseState.Crouching) && !m_compatibleAvatar && (!BodySystem.isCalibratedAsFullBody || m_fbtAnimations));
|
||||
PlayerSetup.Instance.animatorManager.SetAnimatorParameterBool("Prone", (m_poseState == PoseState.Proning) && !m_compatibleAvatar && (!BodySystem.isCalibratedAsFullBody || m_fbtAnimations));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -441,6 +448,13 @@ namespace ml_amt
|
|||
}
|
||||
}
|
||||
|
||||
// Game settings
|
||||
void OnGameSettingBoolChange(string p_name, bool p_state)
|
||||
{
|
||||
if(p_name == "GeneralEnableRunningAnimationFullBody")
|
||||
m_fbtAnimations = p_state;
|
||||
}
|
||||
|
||||
// Arbitrary
|
||||
float GetRelativeScale()
|
||||
{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyTitle("AvatarMotionTweaker")]
|
||||
[assembly: AssemblyVersion("1.2.4")]
|
||||
[assembly: AssemblyFileVersion("1.2.4")]
|
||||
[assembly: AssemblyVersion("1.2.5")]
|
||||
[assembly: AssemblyFileVersion("1.2.5")]
|
||||
|
||||
[assembly: MelonLoader.MelonInfo(typeof(ml_amt.AvatarMotionTweaker), "AvatarMotionTweaker", "1.2.4", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
|
||||
[assembly: MelonLoader.MelonInfo(typeof(ml_amt.AvatarMotionTweaker), "AvatarMotionTweaker", "1.2.5", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
|
||||
[assembly: MelonLoader.MelonGame(null, "ChilloutVR")]
|
||||
[assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
|
||||
[assembly: MelonLoader.MelonPlatformDomain(MelonLoader.MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
|
Loading…
Add table
Add a link
Reference in a new issue