diff --git a/JumpPatch/HarmonyPatches.cs b/JumpPatch/HarmonyPatches.cs index b763f34..fb9674f 100644 --- a/JumpPatch/HarmonyPatches.cs +++ b/JumpPatch/HarmonyPatches.cs @@ -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; + } } \ No newline at end of file diff --git a/JumpPatch/Properties/AssemblyInfo.cs b/JumpPatch/Properties/AssemblyInfo.cs index a4711a6..0241b0a 100644 --- a/JumpPatch/Properties/AssemblyInfo.cs +++ b/JumpPatch/Properties/AssemblyInfo.cs @@ -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"; } \ No newline at end of file diff --git a/JumpPatch/format.json b/JumpPatch/format.json index dd05cdb..17bdee3 100644 --- a/JumpPatch/format.json +++ b/JumpPatch/format.json @@ -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" } \ No newline at end of file