diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-05-22 07:39:05 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:42:10 +0200 |
commit | 008f8a1e199554fcfc3dc41ecae012575f69d82a (patch) | |
tree | 58d904a17262f7190231a1696f896aabbc9966c2 /src/audio | |
parent | Fix engine sounds, player and male01 ped comments (diff) | |
download | re3-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 |
Diffstat (limited to '')
-rw-r--r-- | src/audio/AudioLogic.cpp | 5 |
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, |