game/server/hl2/weapon_sniperrifle.cpp
bool CWeaponSniperRifle::Holster( CBaseCombatWeapon *pSwitchingTo )
{
	CBasePlayer *pPlayer = ToBasePlayer( GetOwner() );
	if (pPlayer != NULL)
	{
		if ( m_nZoomLevel != 0 )
		{
			if ( pPlayer->SetFOV( this, 0 ) )
			{
				pPlayer->ShowViewModel(true);		
				m_nZoomLevel = 0;
			}
		}
	}

	return BaseClass::Holster(pSwitchingTo);
}
//-----------------------------------------------------------------------------
// Purpose: Turns off the zoom when the rifle is holstered.
//-----------------------------------------------------------------------------
Turns off the zoom when the rifle is holstered.
Turns off the zoom when the rifle is holstered .
bool CWeaponSniperRifle::Holster( CBaseCombatWeapon *pSwitchingTo )
{
	CBasePlayer *pPlayer = ToBasePlayer( GetOwner() );
	if (pPlayer != NULL)
	{
		if ( m_nZoomLevel != 0 )
		{
			if ( pPlayer->SetFOV( this, 0 ) )
			{
				pPlayer->ShowViewModel(true);		
				m_nZoomLevel = 0;
			}
		}
	}
	return BaseClass::Holster(pSwitchingTo);
}
bool CWeaponSniperRifle :: Holster ( CBaseCombatWeapon * pSwitchingTo ) { CBasePlayer * pPlayer = ToBasePlayer ( GetOwner ( ) ) ; if ( pPlayer != NULL ) { if ( m_nZoomLevel != 0 ) { if ( pPlayer -> SetFOV ( this , 0 ) ) { pPlayer -> ShowViewModel ( true ) ; m_nZoomLevel = 0 ; } } } return BaseClass :: Holster ( pSwitchingTo ) ; }
Purpose: Turns off the zoom when the rifle is holstered.
Purpose : Turns off the zoom when the rifle is holstered .