Add optional upwards viewkick to HL2 weapon_pistol

This commit is contained in:
ALLEN-PC\acj30 2023-12-17 11:55:51 -06:00
parent e34e0d3b10
commit b97a58e9fa

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;