PlayerJustGotInCar

This commit is contained in:
Filip Gawin 2019-06-30 23:46:21 +02:00
parent 8cd2a19c4e
commit e589589538
2 changed files with 12 additions and 2 deletions

View File

@ -116,7 +116,15 @@ void cAudioManager::SetDynamicAcousticModelingStatus(bool status)
void
cAudioManager::GenerateIntegerRandomNumberTable()
{
for(int32 i = 0; i < 5; i++) { m_anRandomTable[i] = rand(); }
for(int32 i = 0; i < 5; i++) { m_anRandomTable[i] = rand(); }
}
bool bPlayerJustGotInCar = *(bool*)0x6508C4;
void
cAudioManager::PlayerJustGotInCar()
{
if(m_bIsInitialised) { bPlayerJustGotInCar = true; }
}
void
@ -2800,6 +2808,7 @@ InjectHook(0x569640, &cAudioManager::PostTerminateGameSpecificShutdown, PATCH_JU
InjectHook(0x57AA00, &cAudioManager::SetDynamicAcousticModelingStatus, PATCH_JUMP);
InjectHook(0x57AA50, &cAudioManager::IsAudioInitialised, PATCH_JUMP);
InjectHook(0x57C290, &cAudioManager::GenerateIntegerRandomNumberTable, PATCH_JUMP);
InjectHook(0x56AD10, &cAudioManager::PlayerJustGotInCar, PATCH_JUMP);
InjectHook(0x56AD20, &cAudioManager::PlayerJustLeftCar, PATCH_JUMP);
InjectHook(0x570DB0, &cAudioManager::GetPhrase, PATCH_JUMP);

View File

@ -225,7 +225,8 @@ public:
void SetDynamicAcousticModelingStatus(bool status);
void GenerateIntegerRandomNumberTable();
void PlayerJustLeftCar(void);
void PlayerJustGotInCar();
void PlayerJustLeftCar();
void Service();
void GetPhrase(uint32 *phrase, uint32 *prevPhrase, uint32 sample,
uint32 maxOffset);