diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-06-12 18:37:55 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:45:49 +0200 |
commit | 3cc9eb1c1c9fd8e07bf5d0bdbd45597a8333aa38 (patch) | |
tree | 85f1c3e43b352ccb00ab1a5839b465c5f94161ff | |
parent | Fix bullet trace sound offset (diff) | |
download | re3-3cc9eb1c1c9fd8e07bf5d0bdbd45597a8333aa38.tar re3-3cc9eb1c1c9fd8e07bf5d0bdbd45597a8333aa38.tar.gz re3-3cc9eb1c1c9fd8e07bf5d0bdbd45597a8333aa38.tar.bz2 re3-3cc9eb1c1c9fd8e07bf5d0bdbd45597a8333aa38.tar.lz re3-3cc9eb1c1c9fd8e07bf5d0bdbd45597a8333aa38.tar.xz re3-3cc9eb1c1c9fd8e07bf5d0bdbd45597a8333aa38.tar.zst re3-3cc9eb1c1c9fd8e07bf5d0bdbd45597a8333aa38.zip |
-rw-r--r-- | src/audio/AudioLogic.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index a199266c..fd3a3703 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -3561,6 +3561,17 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) AddSampleToRequestedQueue(); } } + + CVector backPropellerPos; + if (automobile != nil) + automobile->GetComponentWorldPosition(CAR_BOOT, backPropellerPos); + else if (params.m_VehicleType == VEHICLE_TYPE_HELI) +#ifdef FIX_BUGS + backPropellerPos = +#endif + params.m_pVehicle->GetMatrix() * CVector(0.0f, -10.0f, 0.0f); + else + backPropellerPos = m_sQueueSample.m_vecPos; if (params.m_fDistance >= SQR(140.0f)) return; @@ -3765,12 +3776,8 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) vecPosOld = m_sQueueSample.m_vecPos; distanceCalculatedOld = params.m_bDistanceCalculated; distanceOld = params.m_fDistance; - - if (automobile != nil) - automobile->GetComponentWorldPosition(CAR_BOOT, m_sQueueSample.m_vecPos); - else if (params.m_VehicleType == VEHICLE_TYPE_HELI) - m_sQueueSample.m_vecPos = CVector(0.0f, -10.0f, 0.0f); //this is from android, but for real it's not used + m_sQueueSample.m_vecPos = backPropellerPos; params.m_bDistanceCalculated = FALSE; params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos); if (params.m_fDistance < SQR(27.0f)) { @@ -3779,7 +3786,7 @@ cAudioManager::ProcessCarHeli(cVehicleParams& params) if (m_sQueueSample.m_nVolume) { m_sQueueSample.m_nCounter = 2; m_sQueueSample.m_nSampleIndex = hunterBool ? SFX_HELI_APACHE_3 : SFX_CAR_HELI_REA; - m_sQueueSample.m_nBankIndex = 0; + m_sQueueSample.m_nBankIndex = SFX_BANK_0; m_sQueueSample.m_bIs2D = FALSE; m_sQueueSample.m_nReleasingVolumeModificator = 1; m_sQueueSample.m_nFrequency = (volumeModifier + 1.0f) * 16000; |