SetEntityStatus

This commit is contained in:
Filip Gawin 2019-06-30 22:55:58 +02:00
parent 9df4bc2029
commit 198a92555c
2 changed files with 10 additions and 0 deletions

View File

@ -9,6 +9,14 @@
cAudioManager &AudioManager = *(cAudioManager *)0x880FC0; 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 void
cAudioManager::PreTerminateGameSpecificShutdown() cAudioManager::PreTerminateGameSpecificShutdown()
{ {
@ -2756,6 +2764,7 @@ cAudioManager::Service()
} }
STARTPATCHES STARTPATCHES
InjectHook(0x57A4C0, &cAudioManager::SetEntityStatus, PATCH_JUMP);
InjectHook(0x569570, &cAudioManager::PreTerminateGameSpecificShutdown, PATCH_JUMP); InjectHook(0x569570, &cAudioManager::PreTerminateGameSpecificShutdown, PATCH_JUMP);
InjectHook(0x57A400, &cAudioManager::DestroyEntity, PATCH_JUMP); InjectHook(0x57A400, &cAudioManager::DestroyEntity, PATCH_JUMP);
InjectHook(0x569640, &cAudioManager::PostTerminateGameSpecificShutdown, PATCH_JUMP); InjectHook(0x569640, &cAudioManager::PostTerminateGameSpecificShutdown, PATCH_JUMP);

View File

@ -216,6 +216,7 @@ public:
char field_19195; char field_19195;
int m_nTimeOfRecentCrime; int m_nTimeOfRecentCrime;
void SetEntityStatus(int32 id, bool status);
void PreTerminateGameSpecificShutdown(); void PreTerminateGameSpecificShutdown();
void DestroyEntity(int32 id); void DestroyEntity(int32 id);
void PostTerminateGameSpecificShutdown(); void PostTerminateGameSpecificShutdown();