[JumpPatch] Fix PRM conflict

This commit is contained in:
NotAKidoS 2023-05-02 12:57:28 -05:00
parent e512c9dd70
commit 6fd838e88b
3 changed files with 19 additions and 11 deletions

View file

@ -7,9 +7,17 @@ namespace NAK.JumpPatch.HarmonyPatches;
class MovementSystemPatches
{
[HarmonyPrefix]
[HarmonyPatch(typeof(MovementSystem), "Update")]
private static void Prefix_MovementSystem_Update(ref bool ____isGrounded)
[HarmonyPatch(typeof(MovementSystem), nameof(MovementSystem.Update))]
private static void Prefix_MovementSystem_Update(ref bool ____isGrounded, ref bool __state)
{
__state = CVRInputManager.Instance.jump;
CVRInputManager.Instance.jump = CVRInputManager.Instance.jump && ____isGrounded;
}
[HarmonyPostfix]
[HarmonyPatch(typeof(MovementSystem), nameof(MovementSystem.Update))]
private static void Postfix_MovementSystem_Update(ref bool __state)
{
CVRInputManager.Instance.jump = __state;
}
}

View file

@ -25,6 +25,6 @@ using System.Reflection;
namespace NAK.JumpPatch.Properties;
internal static class AssemblyInfoParams
{
public const string Version = "1.0.0";
public const string Version = "1.0.1";
public const string Author = "NotAKidoS";
}

View file

@ -1,23 +1,23 @@
{
"_id": -1,
"_id": 151,
"name": "JumpPatch",
"modversion": "1.0.0",
"modversion": "1.0.1",
"gameversion": "2022r170",
"loaderversion": "0.5.7",
"modtype": "Mod",
"author": "NotAKidoS",
"description": "Prevents you from jumping until you've been grounded for a frame.\nThis ensures Grounded parameter fires when hitting the ground while holding jump.",
"searchtags": [
"toes",
"vrik",
"ik",
"feet"
"jump",
"animation",
"grounded",
"simple"
],
"requirements": [
"None"
],
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r3/JumpPatch.dll",
"downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r4/JumpPatch.dll",
"sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/JumpPatch/",
"changelog": "- Initial Release\n- I like my jump animations.",
"changelog": "- Return jump input after MovementSystem.Update. Fixes conflict with PRM jump-to-recover option.",
"embedcolor": "#e56597"
}