Merge pull request #262 from Blixibon/mapbase/feature/hl2-pistol-upwards-viewkick

weapon_pistol upwards view kick cvar
This commit is contained in:
Blixibon 2024-02-04 15:22:03 -06:00 committed by GitHub
commit 8505ab4579
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -526,6 +526,10 @@ bool CWeaponPistol::Reload( void )
return fRet;
}
#ifdef MAPBASE
ConVar weapon_pistol_upwards_viewkick( "weapon_pistol_upwards_viewkick", "0" );
#endif
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
@ -538,7 +542,11 @@ void CWeaponPistol::AddViewKick( void )
QAngle viewPunch;
#ifdef MAPBASE
viewPunch.x = weapon_pistol_upwards_viewkick.GetBool() ? random->RandomFloat( -0.5f, -0.25f ) : random->RandomFloat( 0.25f, 0.5f );
#else
viewPunch.x = random->RandomFloat( 0.25f, 0.5f );
#endif
viewPunch.y = random->RandomFloat( -.6f, .6f );
viewPunch.z = 0.0f;