summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-09-01 10:44:38 +0300
committerSergeanur <s.anureev@yandex.ua>2021-09-01 10:44:38 +0300
commit57757e6c6f04c838ff1827617f03703acdeb44ef (patch)
tree1855554a5e49f7bca5a55bdcf9e3db734321ff5e /src
parent1c426fdff119314ff9c7d3b74450c8e0789a87e5 (diff)
Audio: PS2 pager code
Diffstat (limited to 'src')
-rw-r--r--src/audio/AudioLogic.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 38bc4256..2ec0d73f 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -3791,6 +3791,12 @@ cAudioManager::SetupPedComments(cPedParams &params, uint16 sound)
maxDist = PED_COMMENT_MAX_DIST;
} else {
switch (sound) {
+#ifdef GTA_PS2
+ case SOUND_PAGER:
+ maxDist = PED_COMMENT_MAX_DIST;
+ pedComment.m_nSampleIndex = SFX_PAGER;
+ break;
+#endif
case SOUND_PED_HELI_PLAYER_FOUND:
maxDist = PED_COMMENT_POLICE_HELI_MAX_DIST;
pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 29 + SFX_POLICE_HELI_1;
@@ -3845,6 +3851,12 @@ cAudioManager::SetupPedComments(cPedParams &params, uint16 sound)
m_sPedComments.Add(&pedComment);
}
}
+#ifdef GTA_PS2
+ else {
+ m_sQueueSample.m_nVolume = MAX_VOLUME;
+ pedComment.m_nProcess = 40;
+ }
+#endif
}
}
@@ -8132,9 +8144,17 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nSampleIndex = SFX_TIMER_BEEP;
break;
case SOUND_PAGER:
- // TODO: ps2 code
+#ifdef GTA_PS2
+ {
+ cPedParams pedParams;
+ pedParams.m_bDistanceCalculated = TRUE;
+ SetupPedComments(pedParams, SOUND_PAGER);
+ continue;
+ }
+#else
m_sQueueSample.m_nSampleIndex = SFX_PAGER;
break;
+#endif
case SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM:
m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_RIFLE;
break;