From ea0ba0daea309c6a2629ec86ab9a6001245a1662 Mon Sep 17 00:00:00 2001 From: FlaminSarge Date: Fri, 21 Feb 2025 23:05:47 -0800 Subject: [PATCH] Fix not being able to airdash while ducking on non-Scout classes (e.g. for Halloween speed boost condition) --- src/game/shared/tf/tf_gamemovement.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/game/shared/tf/tf_gamemovement.cpp b/src/game/shared/tf/tf_gamemovement.cpp index 56a36c663..cdf4923d0 100644 --- a/src/game/shared/tf/tf_gamemovement.cpp +++ b/src/game/shared/tf/tf_gamemovement.cpp @@ -1215,18 +1215,18 @@ bool CTFGameMovement::CheckJumpButton() if ( !m_pTFPlayer->CanJump() ) return false; - // Check to see if the player is a scout. - bool bScout = m_pTFPlayer->GetPlayerClass()->IsClass( TF_CLASS_SCOUT ); + // Check to see if the player can air dash + bool bCanAirDash = m_pTFPlayer->CanAirDash(); bool bAirDash = false; bool bOnGround = ( player->GetGroundEntity() != NULL ); ToggleParachute(); - // Cannot jump will ducked. + // Cannot jump while ducked. if ( player->GetFlags() & FL_DUCKING ) { - // Let a scout do it. - bool bAllow = ( bScout && !bOnGround ); + // Let airdash do it. + bool bAllow = ( bCanAirDash && !bOnGround ); if ( !bAllow ) return false; @@ -1241,10 +1241,10 @@ bool CTFGameMovement::CheckJumpButton() return false; // In air, so ignore jumps - // (unless you are a scout or ghost or parachute + // (unless airdash or ghost or parachute) if ( !bOnGround ) { - if ( m_pTFPlayer->CanAirDash() ) + if ( bCanAirDash ) { bAirDash = true; }