From 3bed6f420103ac163b99bf02ba5df6e0c9bedc72 Mon Sep 17 00:00:00 2001 From: SDraw Date: Fri, 1 Sep 2023 09:16:08 +0300 Subject: [PATCH] VRIKRootController behaviour fix Flight toggle detection fix --- README.md | 4 ++-- ml_amt/MotionTweaker.cs | 6 +++--- ml_amt/Properties/AssemblyInfo.cs | 2 +- ml_amt/ml_amt.csproj | 2 +- ml_prm/Main.cs | 10 +++++----- ml_prm/Properties/AssemblyInfo.cs | 2 +- ml_prm/RagdollController.cs | 2 +- ml_prm/ml_prm.csproj | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2bc9035..0f19c7e 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@ Merged set of MelonLoader mods for ChilloutVR. **Table for game build 2022r171p2:** | Full name | Short name | Latest version | Available in [CVRMA](https://github.com/knah/CVRMelonAssistant) | |:---------:|:----------:|:--------------:| :----------------------------------------------------------------| -| [Avatar Motion Tweaker](/ml_amt/README.md) | ml_amt | 1.3.0 [:arrow_down:](../../releases/latest/download/ml_amt.dll)| ✔ Yes | +| [Avatar Motion Tweaker](/ml_amt/README.md) | ml_amt | 1.3.1 [:arrow_down:](../../releases/latest/download/ml_amt.dll)| ✔ Yes
:hourglass_flowing_sand: Update review | | [Desktop Head Tracking](/ml_dht/README.md)| ml_dht | - | ✔ Yes
:warning:Broken | | [Desktop Reticle Switch](/ml_drs/README.md)| ml_drs | 1.0.1 [:arrow_down:](../../releases/latest/download/ml_drs.dll)| ✔ Yes | | [Extended Game Notifications](/ml_egn/README.md) | ml_egn | 1.0.3 [:arrow_down:](../../releases/latest/download/ml_egn.dll)| ✔ Yes | | [Leap Motion Extension](/ml_lme/README.md)| ml_lme | 1.4.1 [:arrow_down:](../../releases/latest/download/ml_lme.dll)| ✔ Yes | | [Pickup Arm Movement](/ml_pam/README.md)| ml_pam | 1.0.6 [:arrow_down:](../../releases/latest/download/ml_pam.dll)| ✔ Yes | | [Player Movement Copycat](/ml_pmc/README.md)| ml_pmc | 1.0.2 [:arrow_down:](../../releases/latest/download/ml_pmc.dll)| ✔ Yes | -| [Player Ragdoll Mod](/ml_prm/README.md)| ml_prm | 1.0.7 [:arrow_down:](../../releases/latest/download/ml_prm.dll)| ✔ Yes | +| [Player Ragdoll Mod](/ml_prm/README.md)| ml_prm | 1.0.8 [:arrow_down:](../../releases/latest/download/ml_prm.dll)| ✔ Yes
:hourglass_flowing_sand: Update review | **Archived mods:** | Full name | Short name | Notes | diff --git a/ml_amt/MotionTweaker.cs b/ml_amt/MotionTweaker.cs index 857308e..d5b8ca8 100644 --- a/ml_amt/MotionTweaker.cs +++ b/ml_amt/MotionTweaker.cs @@ -262,10 +262,10 @@ namespace ml_amt } bool l_solverActive = !Mathf.Approximately(m_vrIk.solver.IKPositionWeight, 0f); - if(l_locomotionOverride && l_solverActive && m_followHips && (!m_moving || (PlayerSetup.Instance.avatarUpright <= PlayerSetup.Instance.avatarCrouchLimit)) && m_inVR && !BodySystem.isCalibratedAsFullBody && !ModSupporter.SkipHipsOverride()) + if(l_locomotionOverride && l_solverActive && (m_followHips && !MovementSystem.Instance.sitting) && (!m_moving || (PlayerSetup.Instance.avatarUpright <= PlayerSetup.Instance.avatarCrouchLimit)) && m_inVR && !BodySystem.isCalibratedAsFullBody && !ModSupporter.SkipHipsOverride()) { m_vrIk.solver.plantFeet = false; - if(IKSystem.VrikRootController != null) + if((IKSystem.VrikRootController != null) && !MovementSystem.Instance.sitting) IKSystem.VrikRootController.enabled = false; PlayerSetup.Instance._avatar.transform.localPosition = m_hipsToPlayer; } @@ -273,7 +273,7 @@ namespace ml_amt if(m_locomotionOverride && !l_locomotionOverride) { m_vrIk.solver.Reset(); - if(IKSystem.VrikRootController != null) + if((IKSystem.VrikRootController != null) && !MovementSystem.Instance.sitting) IKSystem.VrikRootController.enabled = true; } m_locomotionOverride = l_locomotionOverride; diff --git a/ml_amt/Properties/AssemblyInfo.cs b/ml_amt/Properties/AssemblyInfo.cs index cdf7d7c..3ca3e42 100644 --- a/ml_amt/Properties/AssemblyInfo.cs +++ b/ml_amt/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -[assembly: MelonLoader.MelonInfo(typeof(ml_amt.AvatarMotionTweaker), "AvatarMotionTweaker", "1.3.0", "SDraw", "https://github.com/SDraw/ml_mods_cvr")] +[assembly: MelonLoader.MelonInfo(typeof(ml_amt.AvatarMotionTweaker), "AvatarMotionTweaker", "1.3.1", "SDraw", "https://github.com/SDraw/ml_mods_cvr")] [assembly: MelonLoader.MelonGame(null, "ChilloutVR")] [assembly: MelonLoader.MelonOptionalDependencies("ml_prm", "ml_pmc")] [assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] diff --git a/ml_amt/ml_amt.csproj b/ml_amt/ml_amt.csproj index ba59599..1cef59f 100644 --- a/ml_amt/ml_amt.csproj +++ b/ml_amt/ml_amt.csproj @@ -6,7 +6,7 @@ None AvatarMotionTweaker AvatarMotionTweaker - 1.3.0 + 1.3.1 x64 ml_amt diff --git a/ml_prm/Main.cs b/ml_prm/Main.cs index 0cd764d..785bfc2 100644 --- a/ml_prm/Main.cs +++ b/ml_prm/Main.cs @@ -62,9 +62,9 @@ namespace ml_prm null ); HarmonyInstance.Patch( - typeof(MovementSystem).GetMethod(nameof(MovementSystem.ToggleFlight)), + typeof(MovementSystem).GetMethod(nameof(MovementSystem.ChangeFlight)), null, - new HarmonyLib.HarmonyMethod(typeof(PlayerRagdollMod).GetMethod(nameof(OnToggleFlight_Postfix), BindingFlags.Static | BindingFlags.NonPublic)) + new HarmonyLib.HarmonyMethod(typeof(PlayerRagdollMod).GetMethod(nameof(OnChangeFlight_Postfix), BindingFlags.Static | BindingFlags.NonPublic)) ); // Whitelist the toggle script @@ -199,13 +199,13 @@ namespace ml_prm } } - static void OnToggleFlight_Postfix() => ms_instance?.OnToggleFlight(); - void OnToggleFlight() + static void OnChangeFlight_Postfix() => ms_instance?.OnChangeFlight(); + void OnChangeFlight() { try { if(m_localController != null) - m_localController.OnToggleFlight(); + m_localController.OnChangeFlight(); } catch(Exception e) { diff --git a/ml_prm/Properties/AssemblyInfo.cs b/ml_prm/Properties/AssemblyInfo.cs index 6c1e7c9..ecb095f 100644 --- a/ml_prm/Properties/AssemblyInfo.cs +++ b/ml_prm/Properties/AssemblyInfo.cs @@ -1,6 +1,6 @@ using System.Reflection; -[assembly: MelonLoader.MelonInfo(typeof(ml_prm.PlayerRagdollMod), "PlayerRagdollMod", "1.0.7", "SDraw", "https://github.com/SDraw/ml_mods_cvr")] +[assembly: MelonLoader.MelonInfo(typeof(ml_prm.PlayerRagdollMod), "PlayerRagdollMod", "1.0.8", "SDraw", "https://github.com/SDraw/ml_mods_cvr")] [assembly: MelonLoader.MelonGame(null, "ChilloutVR")] [assembly: MelonLoader.MelonPriority(2)] [assembly: MelonLoader.MelonOptionalDependencies("BTKUILib")] diff --git a/ml_prm/RagdollController.cs b/ml_prm/RagdollController.cs index 894f4ec..bc2a664 100644 --- a/ml_prm/RagdollController.cs +++ b/ml_prm/RagdollController.cs @@ -348,7 +348,7 @@ namespace ml_prm } } - internal void OnToggleFlight() + internal void OnChangeFlight() { if(m_avatarReady && m_enabled && MovementSystem.Instance.flying) SwitchRagdoll(); diff --git a/ml_prm/ml_prm.csproj b/ml_prm/ml_prm.csproj index b6e6a14..ffb3458 100644 --- a/ml_prm/ml_prm.csproj +++ b/ml_prm/ml_prm.csproj @@ -4,7 +4,7 @@ netstandard2.1 x64 PlayerRagdollMod - 1.0.7 + 1.0.8 SDraw None PlayerRagdollMod