Skip to content

Commit b73f3b7

Browse files
committed
cstrike: add autojump convar
1 parent 2d3f31d commit b73f3b7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

game/shared/cstrike/cs_gamemovement.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extern bool g_bMovementOptimizations;
2828

2929
ConVar sv_timebetweenducks( "sv_timebetweenducks", "0", FCVAR_REPLICATED, "Minimum time before recognizing consecutive duck key", true, 0.0, true, 2.0 );
3030
ConVar sv_enableboost( "sv_enableboost", "0", FCVAR_REPLICATED | FCVAR_NOTIFY, "Allow boost exploits");
31-
31+
ConVar cs_autojump( "cs_autojump", "0", FCVAR_REPLICATED | FCVAR_NOTIFY );
3232

3333
class CCSGameMovement : public CGameMovement
3434
{
@@ -691,8 +691,11 @@ bool CCSGameMovement::CheckJumpButton( void )
691691
return false; // in air, so no effect
692692
}
693693

694-
if ( mv->m_nOldButtons & IN_JUMP )
694+
if ( (mv->m_nOldButtons & IN_JUMP) &&
695+
(!cs_autojump.GetBool() && m_pCSPlayer->GetGroundEntity()) )
696+
{
695697
return false; // don't pogo stick
698+
}
696699

697700
if ( !sv_enablebunnyhopping.GetBool() )
698701
{

0 commit comments

Comments
 (0)