1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2025-01-09 20:35:27 +00:00

Fix mod 0 crash

This commit is contained in:
Sergeanur 2021-05-22 08:39:05 +03:00
parent 499b16678f
commit 008f8a1e19

View file

@ -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,