mirror of
https://github.com/GTAmodding/re3.git
synced 2025-07-15 00:04:08 +00:00
AudioManager::GetPhrase
This commit is contained in:
parent
c7e33bd8e5
commit
d4b566ecb2
3 changed files with 3270 additions and 5 deletions
|
@ -10,8 +10,21 @@ cAudioManager::PlayerJustLeftCar(void)
|
|||
// UNUSED: This is a perfectly empty function.
|
||||
}
|
||||
|
||||
void
|
||||
cAudioManager::GetPhrase(uint32 *phrase, uint32 *prevPhrase,
|
||||
eAudioSamples sample, uint32 maxOffset)
|
||||
{
|
||||
*phrase = (uint32)sample +
|
||||
(uint32)m_anRandomTable[m_sQueueSample.m_nEntityIndex & 3] %
|
||||
maxOffset;
|
||||
if(*phrase == *prevPhrase && ++*phrase >= (uint32)sample + maxOffset)
|
||||
*phrase = (uint32)sample;
|
||||
*prevPhrase = *phrase;
|
||||
}
|
||||
|
||||
WRAPPER void cAudioManager::Service() { EAXJMP(0x57A2A0); }
|
||||
|
||||
STARTPATCHES
|
||||
InjectHook(0x56AD20, &cAudioManager::PlayerJustLeftCar, PATCH_JUMP);
|
||||
ENDPATCHES
|
||||
InjectHook(0x570DB0, &cAudioManager::GetPhrase, PATCH_JUMP);
|
||||
ENDPATCHES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue