summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-06-30 22:55:58 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-07-04 01:02:00 +0200
commit198a92555cb7dbc71b5ea036b744b749a667c703 (patch)
treee34568f6db6c8ae922d6b05522adce2f7e008a57 /src
parentPreTerminateGameSpecificShutdown (diff)
downloadre3-198a92555cb7dbc71b5ea036b744b749a667c703.tar
re3-198a92555cb7dbc71b5ea036b744b749a667c703.tar.gz
re3-198a92555cb7dbc71b5ea036b744b749a667c703.tar.bz2
re3-198a92555cb7dbc71b5ea036b744b749a667c703.tar.lz
re3-198a92555cb7dbc71b5ea036b744b749a667c703.tar.xz
re3-198a92555cb7dbc71b5ea036b744b749a667c703.tar.zst
re3-198a92555cb7dbc71b5ea036b744b749a667c703.zip
Diffstat (limited to 'src')
-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();