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:
parent
499b16678f
commit
008f8a1e19
|
@ -5469,6 +5469,11 @@ cAudioManager::GetPedCommentSfx(CPed *ped, int32 sound)
|
||||||
void
|
void
|
||||||
cAudioManager::GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const
|
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;
|
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,
|
// check if the same sfx like last time, if yes, then try use next one,
|
||||||
|
|
Loading…
Reference in a new issue