summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-22 07:39:05 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:42:10 +0200
commit008f8a1e199554fcfc3dc41ecae012575f69d82a (patch)
tree58d904a17262f7190231a1696f896aabbc9966c2
parentFix engine sounds, player and male01 ped comments (diff)
downloadre3-008f8a1e199554fcfc3dc41ecae012575f69d82a.tar
re3-008f8a1e199554fcfc3dc41ecae012575f69d82a.tar.gz
re3-008f8a1e199554fcfc3dc41ecae012575f69d82a.tar.bz2
re3-008f8a1e199554fcfc3dc41ecae012575f69d82a.tar.lz
re3-008f8a1e199554fcfc3dc41ecae012575f69d82a.tar.xz
re3-008f8a1e199554fcfc3dc41ecae012575f69d82a.tar.zst
re3-008f8a1e199554fcfc3dc41ecae012575f69d82a.zip
-rw-r--r--src/audio/AudioLogic.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index f1fa795f..38836c3c 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -5469,6 +5469,11 @@ cAudioManager::GetPedCommentSfx(CPed *ped, int32 sound)
void
cAudioManager::GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const
{
+ if (maxOffset == 0) {
+ phrase = prevPhrase = NO_SAMPLE;
+ return;
+ }
+
phrase = sample + m_anRandomTable[m_sQueueSample.m_nEntityIndex & 3] % maxOffset;
// check if the same sfx like last time, if yes, then try use next one,