diff options
author | Roman Masanin <36927roma@gmail.com> | 2020-09-21 02:21:17 +0200 |
---|---|---|
committer | Roman Masanin <36927roma@gmail.com> | 2020-09-21 02:21:17 +0200 |
commit | 579d96534dfcd9206c659b582740bcadda3469a3 (patch) | |
tree | 44dcf6e830bd5fab96ccc2ac2c26110868b2ed6b /src/audio/AudioLogic.cpp | |
parent | cleanup processVehicleEngine and some fixes (diff) | |
download | re3-579d96534dfcd9206c659b582740bcadda3469a3.tar re3-579d96534dfcd9206c659b582740bcadda3469a3.tar.gz re3-579d96534dfcd9206c659b582740bcadda3469a3.tar.bz2 re3-579d96534dfcd9206c659b582740bcadda3469a3.tar.lz re3-579d96534dfcd9206c659b582740bcadda3469a3.tar.xz re3-579d96534dfcd9206c659b582740bcadda3469a3.tar.zst re3-579d96534dfcd9206c659b582740bcadda3469a3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio/AudioLogic.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 40d47e1b..e76bb99d 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -290,10 +290,11 @@ void cAudioManager::CalculateDistance(bool &distCalculated, float dist) { if (!distCalculated) { - if (dist <= 0.0) - m_sQueueSample.m_fDistance = 0.0; - else + if (dist > 0.0f) m_sQueueSample.m_fDistance = Sqrt(dist); + + else + m_sQueueSample.m_fDistance = 0.0f; distCalculated = true; } } @@ -1297,7 +1298,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams* params) } void -cAudioManager::UpdateGasPedalAudio(CVehicle* veh, eVehicleType vehType) +cAudioManager::UpdateGasPedalAudio(CVehicle* veh, int vehType) { float gasPedal = Abs(veh->m_fGasPedal); float* gasPealAudioPtr; |