Don't allow activating parachute on ground (as the conditions will get removed on Think)

This commit is contained in:
FlaminSarge 2025-02-22 00:39:46 -08:00 committed by EricS-Valve
parent a32d24df73
commit 464724334c

View File

@ -1142,9 +1142,10 @@ void CTFGameMovement::ToggleParachute()
}
else
{
bool bOnGround = ( player->GetGroundEntity() != NULL );
int iParachuteDisabled = 0;
CALL_ATTRIB_HOOK_INT_ON_OTHER( m_pTFPlayer, iParachuteDisabled, parachute_disabled );
if ( !iParachuteDisabled && ( tf_parachute_deploy_toggle_allowed.GetBool() || !m_pTFPlayer->m_Shared.InCond( TF_COND_PARACHUTE_DEPLOYED ) ) )
if ( !bOnGround && !iParachuteDisabled && ( tf_parachute_deploy_toggle_allowed.GetBool() || !m_pTFPlayer->m_Shared.InCond( TF_COND_PARACHUTE_DEPLOYED ) ) )
{
m_pTFPlayer->m_Shared.AddCond( TF_COND_PARACHUTE_ACTIVE );
m_pTFPlayer->m_Shared.AddCond( TF_COND_PARACHUTE_DEPLOYED );