summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/audio/AudioManager.cpp9
-rw-r--r--src/audio/AudioManager.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 45ac73c1..6f5e9316 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -10,6 +10,14 @@
cAudioManager &AudioManager = *(cAudioManager *)0x880FC0;
void
+cAudioManager::SetEntityStatus(int32 id, bool status)
+{
+ if(m_bIsInitialised && id >= 0 && id < 200) {
+ if(m_asAudioEntities[id].m_bIsUsed) { m_asAudioEntities[id].m_bStatus = status; }
+ }
+}
+
+void
cAudioManager::PreTerminateGameSpecificShutdown()
{
if(m_nBridgeEntity >= 0) {
@@ -2756,6 +2764,7 @@ cAudioManager::Service()
}
STARTPATCHES
+InjectHook(0x57A4C0, &cAudioManager::SetEntityStatus, PATCH_JUMP);
InjectHook(0x569570, &cAudioManager::PreTerminateGameSpecificShutdown, PATCH_JUMP);
InjectHook(0x57A400, &cAudioManager::DestroyEntity, PATCH_JUMP);
InjectHook(0x569640, &cAudioManager::PostTerminateGameSpecificShutdown, PATCH_JUMP);
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 8d01e1eb..8e5ecc0f 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -216,6 +216,7 @@ public:
char field_19195;
int m_nTimeOfRecentCrime;
+ void SetEntityStatus(int32 id, bool status);
void PreTerminateGameSpecificShutdown();
void DestroyEntity(int32 id);
void PostTerminateGameSpecificShutdown();