summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorRoman Masanin <36927roma@gmail.com>2020-09-28 20:11:24 +0200
committerRoman Masanin <36927roma@gmail.com>2020-09-28 20:11:24 +0200
commita5269b998baa5db5c37674f506d9a41c61939cdf (patch)
tree081f1c20764337e1854f90ed26723e7578bb89ce /src/audio
parenttiny style fix (diff)
downloadre3-a5269b998baa5db5c37674f506d9a41c61939cdf.tar
re3-a5269b998baa5db5c37674f506d9a41c61939cdf.tar.gz
re3-a5269b998baa5db5c37674f506d9a41c61939cdf.tar.bz2
re3-a5269b998baa5db5c37674f506d9a41c61939cdf.tar.lz
re3-a5269b998baa5db5c37674f506d9a41c61939cdf.tar.xz
re3-a5269b998baa5db5c37674f506d9a41c61939cdf.tar.zst
re3-a5269b998baa5db5c37674f506d9a41c61939cdf.zip
Diffstat (limited to '')
-rw-r--r--src/audio/AudioLogic.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 28da2a75..e98151e7 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -3135,10 +3135,10 @@ cAudioManager::ProcessCarHeli(cVehicleParams* params)
if (boat != nil) {
m_sQueueSample.m_nSampleIndex = SFX_SEAPLANE_PRO3;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- if (accelerateState <= 0 && brakeState <= 0)
- m_sQueueSample.m_nFrequency = 3651 + Min(1.0f, freqModifier) * 949;
- else
+ if (accelerateState > 0 || brakeState > 0)
m_sQueueSample.m_nFrequency = 4600 + Min(1.0f, (Max(accelerateState, brakeState) / 255.0f) * freqModifier) * 563;
+ else
+ m_sQueueSample.m_nFrequency = 3651 + Min(1.0f, freqModifier) * 949;
} else {
m_sQueueSample.m_nSampleIndex = SFX_HELI_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;