Skip to content

Commit

Permalink
Merge pull request #44 from selimnahimi/movement-update
Browse files Browse the repository at this point in the history
Update Wallrunning logic
  • Loading branch information
selimnahimi authored Sep 1, 2023
2 parents c0d4df5 + b4982f5 commit c4ef98f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions code/pawn/PawnController.Wallrunning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ bool CanWallrun( WallRunTrace traceWall )
if ( Wallrunning == WallRunSide.Right && traceWall.side != WallRunSide.Right )
return false;

// Velocity gets halved when starting wallrun, count with that
if ( !IsWallRunning() && (Entity.Velocity * 0.4f).WithZ( 0 ).Length < 75f )
return false;

if ( IsWallRunning() && Entity.Velocity.WithZ( 0 ).Length < 75f )
if ( IsWallRunning() && Entity.Velocity.WithZ( 0 ).Length < 100f )
return false;

if ( !AngleWithinRange( GetVelocityRotation().Forward, traceWall.traceResult.Normal, maxAngle: 110f ) )
Expand Down

0 comments on commit c4ef98f

Please sign in to comment.