summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-28 08:39:57 +0200
committerSergeanur <s.anureev@yandex.ua>2021-07-28 08:39:57 +0200
commit8960ffaf0ba8976f17110401879f943d69d0506d (patch)
tree048591db01264348622577f36f4fb0cca5efd6c4 /src/audio/AudioLogic.cpp
parentPed comments ordering and type fix + vice function(s) fix (diff)
downloadre3-8960ffaf0ba8976f17110401879f943d69d0506d.tar
re3-8960ffaf0ba8976f17110401879f943d69d0506d.tar.gz
re3-8960ffaf0ba8976f17110401879f943d69d0506d.tar.bz2
re3-8960ffaf0ba8976f17110401879f943d69d0506d.tar.lz
re3-8960ffaf0ba8976f17110401879f943d69d0506d.tar.xz
re3-8960ffaf0ba8976f17110401879f943d69d0506d.tar.zst
re3-8960ffaf0ba8976f17110401879f943d69d0506d.zip
Diffstat (limited to 'src/audio/AudioLogic.cpp')
-rw-r--r--src/audio/AudioLogic.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 0290dcee..83f55d33 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -3022,7 +3022,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_GLASS_CRACK;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 68;
- emittingVol = m_anRandomTable[1] % 30 + 80; //GetRandomNumberInRange(1, 80, 109)
+ emittingVol = m_anRandomTable[1] % 30 + 80;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_CRACK);
m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
@@ -3817,8 +3817,8 @@ uint8 gJumboVolOffsetPercentage;
void
DoJumboVolOffset()
{
- if (!(AudioManager.GetFrameCounter() % (AudioManager.GetRandomNumber(0) % 6 + 3)))
- gJumboVolOffsetPercentage = AudioManager.GetRandomNumber(1) % 60;
+ if (!(AudioManager.m_FrameCounter % (AudioManager.m_anRandomTable[0] % 6 + 3)))
+ gJumboVolOffsetPercentage = AudioManager.m_anRandomTable[1] % 60;
}
void
@@ -5191,7 +5191,7 @@ cAudioManager::SetupPedComments(cPedParams &params, uint16 sound)
switch(sound) {
case SOUND_PED_HELI_PLAYER_FOUND:
soundIntensity = 400.0f;
- pedComment.m_nSampleIndex = GetRandomNumberInRange(m_sQueueSample.m_nEntityIndex % 4, SFX_POLICE_HELI_1, SFX_POLICE_HELI_20);
+ pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 20 + SFX_POLICE_HELI_1;
break;
case SOUND_PED_VCPA_PLAYER_FOUND:
soundIntensity = 400.0f;
@@ -5203,11 +5203,11 @@ cAudioManager::SetupPedComments(cPedParams &params, uint16 sound)
break;
case SOUND_INJURED_PED_MALE_OUCH:
soundIntensity = 40.0f;
- pedComment.m_nSampleIndex = GetRandomNumberInRange(m_sQueueSample.m_nEntityIndex % 4, SFX_GENERIC_MALE_GRUNT_1, SFX_GENERIC_MALE_GRUNT_41);
+ pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 41 + SFX_GENERIC_MALE_GRUNT_1;
break;
case SOUND_INJURED_PED_FEMALE:
soundIntensity = 40.0f;
- pedComment.m_nSampleIndex = GetRandomNumberInRange(m_sQueueSample.m_nEntityIndex % 4, SFX_GENERIC_FEMALE_GRUNT_1, SFX_GENERIC_FEMALE_GRUNT_33);
+ pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 33 + SFX_GENERIC_FEMALE_GRUNT_1;
break;
default:
return;