From daed6c867d7220269ed6986416f0f4360b354dd1 Mon Sep 17 00:00:00 2001 From: squeek Date: Fri, 1 Nov 2013 03:23:35 +0000 Subject: [PATCH] Fixed trimping not being triggered while rampsliding (issue #434) - A CategorizePosition call that sets the player's GroundEntity if they have jump pressed that was called every PlayerMove in 2006 code is called only when needed in 2013 code. Made it call CategorizePosition if jump is pressed. This fix could potentially be handled better. --- mp/src/game/shared/gamemovement.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mp/src/game/shared/gamemovement.cpp b/mp/src/game/shared/gamemovement.cpp index b6d59494..9b328e5b 100644 --- a/mp/src/game/shared/gamemovement.cpp +++ b/mp/src/game/shared/gamemovement.cpp @@ -4650,7 +4650,13 @@ void CGameMovement::PlayerMove( void ) } // Now that we are "unstuck", see where we are (player->GetWaterLevel() and type, player->GetGroundEntity()). - if ( player->GetMoveType() != MOVETYPE_WALK || + if ( + // FF --> There is probably a better way to do this, but CategorizePosition needs to be called when jump is pressed to allow for trimping + // This will set the player's ground entity when rampsliding, which is needed for the jump code to not return early + // Note: in 2006 code, this CategorizePosition was not inside an if statement + mv->m_nButtons & IN_JUMP || + // FF <-- + player->GetMoveType() != MOVETYPE_WALK || mv->m_bGameCodeMovedPlayer || !sv_optimizedmovement.GetBool() ) {