summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoman Masanin <36927roma@gmail.com>2020-09-25 02:10:11 +0200
committerRoman Masanin <36927roma@gmail.com>2020-09-25 02:10:11 +0200
commitf097b9c972c541445ed1fe8f80dbc90ebcf7b92a (patch)
tree9ab0ef1c68fe1ff7ea47f3e8e890f89fea5fa010 /src
parentremove anther goto (diff)
downloadre3-f097b9c972c541445ed1fe8f80dbc90ebcf7b92a.tar
re3-f097b9c972c541445ed1fe8f80dbc90ebcf7b92a.tar.gz
re3-f097b9c972c541445ed1fe8f80dbc90ebcf7b92a.tar.bz2
re3-f097b9c972c541445ed1fe8f80dbc90ebcf7b92a.tar.lz
re3-f097b9c972c541445ed1fe8f80dbc90ebcf7b92a.tar.xz
re3-f097b9c972c541445ed1fe8f80dbc90ebcf7b92a.tar.zst
re3-f097b9c972c541445ed1fe8f80dbc90ebcf7b92a.zip
Diffstat (limited to '')
-rw-r--r--src/audio/AudioLogic.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 4d97ba20..1df7e773 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -3071,7 +3071,7 @@ void cAudioManager::ProcessCarHeli(cVehicleParams* params)
CAutomobile* automobile; // [esp+10h] [ebp-CCh]
CBoat* boat; // [esp+1Ch] [ebp-C0h]
- signed int volume; // ebx
+ signed int volume_5; // ebx
unsigned int freqModifier; // eax
signed int volume; // ebx
uint32 freq_6; // eax
@@ -3142,13 +3142,12 @@ void cAudioManager::ProcessCarHeli(cVehicleParams* params)
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
- if (m_sQueueSample.m_fDistance >= 40.0f)
+ if (m_sQueueSample.m_fDistance >= 40.0f) //!!
volume = speedMultiplied * 75.0f;
- else if (m_sQueueSample.m_fDistance >= 25.0f)
- volume = 0;
- else
+ else if (m_sQueueSample.m_fDistance >= 25.0f) //!!
volume = (m_sQueueSample.m_fDistance - 25.0f) * 0.06666667f * (75.0f * speedMultiplied);
-
+ else
+ volume = 0;
@@ -3250,8 +3249,8 @@ void cAudioManager::ProcessCarHeli(cVehicleParams* params)
if (!boat && params->m_VehicleType != VEHICLE_TYPE_HELI && m_sQueueSample.m_fDistance >= 30.0f) { //!!
if (automobile->bEngineOn) {
if (speedMultiplied >= 1.0f) {
- volume = (1.0f - 0.5f * speedMultiplied) * 70.0f;
- m_sQueueSample.m_nVolume = ComputeVolume(volume, 30.0, m_sQueueSample.m_fDistance);
+ volume_5 = (1.0f - 0.5f * speedMultiplied) * 70.0f;
+ m_sQueueSample.m_nVolume = ComputeVolume(volume_5, 30.0, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume) {
if (hunterBool) {
m_sQueueSample.m_nSampleIndex = SFX_HELI_APACHE_4;
@@ -3267,7 +3266,7 @@ void cAudioManager::ProcessCarHeli(cVehicleParams* params)
m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = volume;
+ m_sQueueSample.m_nEmittingVolume = volume_5;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSpeedMultiplier = 6.0f;