summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
authorRoman Masanin <36927roma@gmail.com>2020-09-21 02:21:17 +0200
committerRoman Masanin <36927roma@gmail.com>2020-09-21 02:21:17 +0200
commit579d96534dfcd9206c659b582740bcadda3469a3 (patch)
tree44dcf6e830bd5fab96ccc2ac2c26110868b2ed6b /src/audio/AudioLogic.cpp
parentcleanup processVehicleEngine and some fixes (diff)
downloadre3-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 'src/audio/AudioLogic.cpp')
-rw-r--r--src/audio/AudioLogic.cpp9
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;