diff options
author | Filip Gawin <filip.gawin@zoho.com> | 2019-06-30 23:46:21 +0200 |
---|---|---|
committer | Filip Gawin <filip.gawin@zoho.com> | 2019-07-04 01:02:00 +0200 |
commit | e589589538b5258b069caeed3fa9a8b27d0e95c2 (patch) | |
tree | a3d8d7aab70f9ca38256accd4b88785b674b7d84 /src/audio | |
parent | CreateEntity (diff) | |
download | re3-e589589538b5258b069caeed3fa9a8b27d0e95c2.tar re3-e589589538b5258b069caeed3fa9a8b27d0e95c2.tar.gz re3-e589589538b5258b069caeed3fa9a8b27d0e95c2.tar.bz2 re3-e589589538b5258b069caeed3fa9a8b27d0e95c2.tar.lz re3-e589589538b5258b069caeed3fa9a8b27d0e95c2.tar.xz re3-e589589538b5258b069caeed3fa9a8b27d0e95c2.tar.zst re3-e589589538b5258b069caeed3fa9a8b27d0e95c2.zip |
Diffstat (limited to 'src/audio')
-rw-r--r-- | src/audio/AudioManager.cpp | 11 | ||||
-rw-r--r-- | src/audio/AudioManager.h | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 460d0517..acf17afe 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -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); diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index 24193448..df48475f 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -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); |