summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-04-13 21:13:07 +0200
committerFilip Gawin <filip.gawin@zoho.com>2020-04-13 21:13:07 +0200
commit67055c1fbb99922d289a61a3e4a58c2636c45a08 (patch)
treef77db657561210c03a6e7d979b7bc22f64fb7348 /src
parentUpdate readme (diff)
downloadre3-67055c1fbb99922d289a61a3e4a58c2636c45a08.tar
re3-67055c1fbb99922d289a61a3e4a58c2636c45a08.tar.gz
re3-67055c1fbb99922d289a61a3e4a58c2636c45a08.tar.bz2
re3-67055c1fbb99922d289a61a3e4a58c2636c45a08.tar.lz
re3-67055c1fbb99922d289a61a3e4a58c2636c45a08.tar.xz
re3-67055c1fbb99922d289a61a3e4a58c2636c45a08.tar.zst
re3-67055c1fbb99922d289a61a3e4a58c2636c45a08.zip
Diffstat (limited to 'src')
-rw-r--r--src/audio/AudioManager.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index f015000a..3ac194fe 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -7708,22 +7708,18 @@ cAudioManager::ProcessProjectiles()
void
cAudioManager::ProcessRainOnVehicle(cVehicleParams *params)
{
- float emittingVol;
- CVehicle *veh;
-
if(params->m_fDistance < SQR(rainOnVehicleIntensity) && CWeather::Rain > 0.01f &&
(!CCullZones::CamNoRain() || !CCullZones::PlayerNoRain())) {
- ++params->m_pVehicle->m_bRainAudioCounter;
- veh = params->m_pVehicle;
+ CVehicle *veh = params->m_pVehicle;
+ ++veh->m_bRainAudioCounter;
if(veh->m_bRainAudioCounter >= 2) {
veh->m_bRainAudioCounter = 0;
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
- emittingVol = 30.f * CWeather::Rain;
+ float emittingVol = 30.f * CWeather::Rain;
m_sQueueSample.m_bVolume = ComputeVolume(
emittingVol, rainOnVehicleIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_nCounter = veh->m_bRainSamplesCounter++;
- veh = params->m_pVehicle;
if(veh->m_bRainSamplesCounter > 4) veh->m_bRainSamplesCounter = 68;
m_sQueueSample.m_nSampleIndex =
(m_anRandomTable[1] & 3) + SFX_CAR_RAIN_1;