//------------------------------------------------------------------------------ // Purpose : // Input : // Output : //------------------------------------------------------------------------------ void CBaseHelicopter::UpdateRotorSoundPitch( int iPitch ) { if (m_pRotorSound) { CSoundEnvelopeController &controller = CSoundEnvelopeController::GetController(); controller.SoundChangePitch( m_pRotorSound, iPitch, 0.1 ); UpdateRotorWashVolume(); } }
void QUA_helicopter::InitializeRotorSound( void ) { if ( !m_pRotorSound ) { CSoundEnvelopeController &controller = CSoundEnvelopeController::GetController(); CPASAttenuationFilter filter( this ); /*if ( HasSpawnFlags( SF_HELICOPTER_LOUD_ROTOR_SOUND ) ) { m_pRotorSound = controller.SoundCreate( filter, entindex(), "NPC_AttackHelicopter.RotorsLoud" ); } else {*/ m_pRotorSound = controller.SoundCreate( filter, entindex(), "NPC_AttackHelicopter.Rotors" ); //} m_pRotorBlast = controller.SoundCreate( filter, entindex(), "NPC_AttackHelicopter.RotorBlast" ); m_pGunFiringSound = controller.SoundCreate( filter, entindex(), "NPC_AttackHelicopter.FireGun" ); controller.Play( m_pGunFiringSound, 0.0, 100 ); } else { Assert(m_pRotorSound); Assert(m_pRotorBlast); Assert(m_pGunFiringSound); } CSoundEnvelopeController &controller = CSoundEnvelopeController::GetController(); if ( m_pRotorSound ) { // Get the rotor sound started up. controller.Play( m_pRotorSound, 0.0, 100 ); UpdateRotorWashVolume(); } if ( m_pRotorBlast ) { // Start the blast sound and then immediately drop it to 0 (starting it at 0 wouldn't start it) controller.Play( m_pRotorBlast, 1.0, 100 ); controller.SoundChangeVolume(m_pRotorBlast, 0, 0.0); } m_iSoundState = SND_CHANGE_PITCH; // hack for going through level transitions }
//------------------------------------------------------------------------------ // Purpose : // Input : // Output : //------------------------------------------------------------------------------ void CBaseHelicopter::InitializeRotorSound( void ) { CSoundEnvelopeController &controller = CSoundEnvelopeController::GetController(); if ( m_pRotorSound ) { // Get the rotor sound started up. controller.Play( m_pRotorSound, 0.0, 100 ); UpdateRotorWashVolume(); } if ( m_pRotorBlast ) { // Start the blast sound and then immediately drop it to 0 (starting it at 0 wouldn't start it) controller.Play( m_pRotorBlast, 1.0, 100 ); controller.SoundChangeVolume(m_pRotorBlast, 0, 0.0); } m_iSoundState = SND_CHANGE_PITCH; // hack for going through level transitions }