Skip to content

Commit

Permalink
Updated vaulting logic
Browse files Browse the repository at this point in the history
- Can't vault onto while falling
  • Loading branch information
selimnahimi committed Sep 6, 2023
1 parent 2cd2f83 commit c699e15
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/pawn/PawnController.Vaulting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ bool ShouldVaultOnto()
if ( IsClimbing() )
return false;

if ( IsFalling() )
return false;

return true;
}

Expand Down
5 changes: 5 additions & 0 deletions code/pawn/PawnController.Wallrunning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,9 @@ WallRunTrace CheckForWall( bool behind = false )

return WallRunTrace.None;
}

public bool IsFalling()
{
return Entity.Velocity.z < 0f;
}
}

0 comments on commit c699e15

Please sign in to comment.