summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio/AudioManager.cpp11
-rw-r--r--src/audio/AudioManager.h3
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);