diff options
author | Roman Masanin <36927roma@gmail.com> | 2020-09-28 21:11:24 +0300 |
---|---|---|
committer | Roman Masanin <36927roma@gmail.com> | 2020-09-28 21:11:24 +0300 |
commit | a5269b998baa5db5c37674f506d9a41c61939cdf (patch) | |
tree | 081f1c20764337e1854f90ed26723e7578bb89ce | |
parent | c317d3d9b14d8169a9e5c920ebf2a5b9db4f8cc4 (diff) |
reverse compare
-rw-r--r-- | src/audio/AudioLogic.cpp | 6 |
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; |