summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;