mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 06:49:22 +00:00
[JumpPatch] Fix PRM conflict
This commit is contained in:
parent
e512c9dd70
commit
6fd838e88b
3 changed files with 19 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue