mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-03 10:29:22 +00:00
New mod: PlayerMovementCopycat
Collider radius upon avatar scaling
This commit is contained in:
parent
3dceb85037
commit
0f5e1484d1
16 changed files with 1122 additions and 7 deletions
|
@ -68,12 +68,17 @@ namespace ml_amt
|
|||
);
|
||||
}
|
||||
|
||||
// Alternative collider height
|
||||
// Alternative collider height and radius
|
||||
HarmonyInstance.Patch(
|
||||
typeof(MovementSystem).GetMethod("UpdateCollider", BindingFlags.NonPublic | BindingFlags.Instance),
|
||||
new HarmonyLib.HarmonyMethod(typeof(AvatarMotionTweaker).GetMethod(nameof(OnUpdateCollider_Prefix), BindingFlags.Static | BindingFlags.NonPublic)),
|
||||
null
|
||||
);
|
||||
HarmonyInstance.Patch(
|
||||
typeof(PlayerSetup).GetMethod("SetupIKScaling", BindingFlags.NonPublic | BindingFlags.Instance),
|
||||
null,
|
||||
new HarmonyLib.HarmonyMethod(typeof(AvatarMotionTweaker).GetMethod(nameof(OnSetupIKScaling_Postfix), BindingFlags.Static | BindingFlags.NonPublic))
|
||||
);
|
||||
|
||||
// AAS overriding fix
|
||||
HarmonyInstance.Patch(
|
||||
|
@ -252,7 +257,25 @@ namespace ml_amt
|
|||
|
||||
return false;
|
||||
}
|
||||
static void OnSetupIKScaling_Postfix(
|
||||
ref PlayerSetup __instance,
|
||||
float ____avatarHeight
|
||||
)
|
||||
{
|
||||
if(!Settings.CollisionScale)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
__instance._movementSystem.UpdateAvatarHeight(Mathf.Clamp(____avatarHeight, 0.05f, float.MaxValue), true);
|
||||
}
|
||||
catch(System.Exception l_exception)
|
||||
{
|
||||
MelonLoader.MelonLogger.Error(l_exception);
|
||||
}
|
||||
}
|
||||
|
||||
// AnimatorOverrideController runtime animation replacement fix
|
||||
static void OnOverride_Prefix(ref CVRAnimatorManager __instance, out AnimatorAnalyzer __state)
|
||||
{
|
||||
__state = new AnimatorAnalyzer();
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyTitle("AvatarMotionTweaker")]
|
||||
[assembly: AssemblyVersion("1.2.7")]
|
||||
[assembly: AssemblyFileVersion("1.2.7")]
|
||||
[assembly: AssemblyVersion("1.2.8")]
|
||||
[assembly: AssemblyFileVersion("1.2.8")]
|
||||
|
||||
[assembly: MelonLoader.MelonInfo(typeof(ml_amt.AvatarMotionTweaker), "AvatarMotionTweaker", "1.2.7", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
|
||||
[assembly: MelonLoader.MelonInfo(typeof(ml_amt.AvatarMotionTweaker), "AvatarMotionTweaker", "1.2.8", "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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue