From c699e1516b73096b8a472c1b9c10aa409eb397d3 Mon Sep 17 00:00:00 2001 From: Selim Nahimi Date: Wed, 6 Sep 2023 18:17:34 +0200 Subject: [PATCH] Updated vaulting logic - Can't vault onto while falling --- code/pawn/PawnController.Vaulting.cs | 3 +++ code/pawn/PawnController.Wallrunning.cs | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/code/pawn/PawnController.Vaulting.cs b/code/pawn/PawnController.Vaulting.cs index b47bf40..dc7c782 100644 --- a/code/pawn/PawnController.Vaulting.cs +++ b/code/pawn/PawnController.Vaulting.cs @@ -185,6 +185,9 @@ bool ShouldVaultOnto() if ( IsClimbing() ) return false; + if ( IsFalling() ) + return false; + return true; } diff --git a/code/pawn/PawnController.Wallrunning.cs b/code/pawn/PawnController.Wallrunning.cs index a10c861..083f5fd 100644 --- a/code/pawn/PawnController.Wallrunning.cs +++ b/code/pawn/PawnController.Wallrunning.cs @@ -142,4 +142,9 @@ WallRunTrace CheckForWall( bool behind = false ) return WallRunTrace.None; } + + public bool IsFalling() + { + return Entity.Velocity.z < 0f; + } }