sp/src/game/server/insolence/weapon_binoculars.cpp
bool CWeaponBinoculars::Holster( CBaseCombatWeapon *pSwitchingTo )
{
	CBasePlayer *pPlayer = ToBasePlayer( GetOwner() );
	if ( pPlayer != NULL )
	{
		if ( m_nZoomLevel != 0 )
		{
			pPlayer->ShowViewModel(true);
			pPlayer->SetFOV( this, 0, 0.2f );
			m_nZoomLevel = 0;
		}
	}

	CSoundEnvelopeController &controller = CSoundEnvelopeController::GetController();

	controller.SoundDestroy( m_pSoundStatic );
	controller.SoundDestroy( m_pSoundSignal );
	m_pSoundStatic = NULL;
	m_pSoundSignal = NULL;

	return true;
}
//-----------------------------------------------------------------------------
// Purpose: Turns off the zoom when the binoculars are holstered.
//-----------------------------------------------------------------------------
Turns off the zoom when the binoculars are holstered.
Turns off the zoom when the binoculars are holstered .
bool CWeaponBinoculars::Holster( CBaseCombatWeapon *pSwitchingTo )
{
	CBasePlayer *pPlayer = ToBasePlayer( GetOwner() );
	if ( pPlayer != NULL )
	{
		if ( m_nZoomLevel != 0 )
		{
			pPlayer->ShowViewModel(true);
			pPlayer->SetFOV( this, 0, 0.2f );
			m_nZoomLevel = 0;
		}
	}
	CSoundEnvelopeController &controller = CSoundEnvelopeController::GetController();
	controller.SoundDestroy( m_pSoundStatic );
	controller.SoundDestroy( m_pSoundSignal );
	m_pSoundStatic = NULL;
	m_pSoundSignal = NULL;
	return true;
}
bool CWeaponBinoculars :: Holster ( CBaseCombatWeapon * pSwitchingTo ) { CBasePlayer * pPlayer = ToBasePlayer ( GetOwner ( ) ) ; if ( pPlayer != NULL ) { if ( m_nZoomLevel != 0 ) { pPlayer -> ShowViewModel ( true ) ; pPlayer -> SetFOV ( this , 0 , 0.2f ) ; m_nZoomLevel = 0 ; } } CSoundEnvelopeController & controller = CSoundEnvelopeController :: GetController ( ) ; controller . SoundDestroy ( m_pSoundStatic ) ; controller . SoundDestroy ( m_pSoundSignal ) ; m_pSoundStatic = NULL ; m_pSoundSignal = NULL ; return true ; }
Purpose: Turns off the zoom when the binoculars are holstered.
Purpose : Turns off the zoom when the binoculars are holstered .