cstrike: add autojump convar

This commit is contained in:
nillerusr 2023-08-22 11:11:39 +03:00
parent 2d3f31d37e
commit b73f3b70fa

View File

@ -28,7 +28,7 @@ extern bool g_bMovementOptimizations;
ConVar sv_timebetweenducks( "sv_timebetweenducks", "0", FCVAR_REPLICATED, "Minimum time before recognizing consecutive duck key", true, 0.0, true, 2.0 );
ConVar sv_enableboost( "sv_enableboost", "0", FCVAR_REPLICATED | FCVAR_NOTIFY, "Allow boost exploits");
ConVar cs_autojump( "cs_autojump", "0", FCVAR_REPLICATED | FCVAR_NOTIFY );
class CCSGameMovement : public CGameMovement
{
@ -691,8 +691,11 @@ bool CCSGameMovement::CheckJumpButton( void )
return false; // in air, so no effect
}
if ( mv->m_nOldButtons & IN_JUMP )
if ( (mv->m_nOldButtons & IN_JUMP) &&
(!cs_autojump.GetBool() && m_pCSPlayer->GetGroundEntity()) )
{
return false; // don't pogo stick
}
if ( !sv_enablebunnyhopping.GetBool() )
{