mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-23 09:39:16 +01:00
DestroyEntity
This commit is contained in:
parent
bd23f2c425
commit
1abd694107
@ -9,6 +9,24 @@
|
|||||||
|
|
||||||
cAudioManager &AudioManager = *(cAudioManager *)0x880FC0;
|
cAudioManager &AudioManager = *(cAudioManager *)0x880FC0;
|
||||||
|
|
||||||
|
void
|
||||||
|
cAudioManager::DestroyEntity(int32 id)
|
||||||
|
{
|
||||||
|
if(m_bIsInitialised && id >= 0 && id < 200 && m_asAudioEntities[id].m_bIsUsed) {
|
||||||
|
m_asAudioEntities[id].m_bIsUsed = 0;
|
||||||
|
for(i = 0; i < m_nAudioEntitiesTotal; ++i) {
|
||||||
|
if(id == m_anAudioEntityIndices[i]) {
|
||||||
|
if(i < 199)
|
||||||
|
memmove(&m_anAudioEntityIndices[i],
|
||||||
|
&m_anAudioEntityIndices[i + 1],
|
||||||
|
4 * (m_nAudioEntitiesTotal - (i + 1)));
|
||||||
|
m_anAudioEntityIndices[--m_nAudioEntitiesTotal] = 200;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cAudioManager::PostTerminateGameSpecificShutdown()
|
cAudioManager::PostTerminateGameSpecificShutdown()
|
||||||
{
|
{
|
||||||
@ -2705,6 +2723,7 @@ cAudioManager::Service()
|
|||||||
}
|
}
|
||||||
|
|
||||||
STARTPATCHES
|
STARTPATCHES
|
||||||
|
InjectHook(0x57A400, &cAudioManager::DestroyEntity, PATCH_JUMP);
|
||||||
InjectHook(0x569640, &cAudioManager::PostTerminateGameSpecificShutdown, PATCH_JUMP);
|
InjectHook(0x569640, &cAudioManager::PostTerminateGameSpecificShutdown, PATCH_JUMP);
|
||||||
InjectHook(0x57AA00, &cAudioManager::SetDynamicAcousticModelingStatus, PATCH_JUMP);
|
InjectHook(0x57AA00, &cAudioManager::SetDynamicAcousticModelingStatus, PATCH_JUMP);
|
||||||
InjectHook(0x57AA50, &cAudioManager::IsAudioInitialised, PATCH_JUMP);
|
InjectHook(0x57AA50, &cAudioManager::IsAudioInitialised, PATCH_JUMP);
|
||||||
|
@ -216,6 +216,7 @@ public:
|
|||||||
char field_19195;
|
char field_19195;
|
||||||
int m_nTimeOfRecentCrime;
|
int m_nTimeOfRecentCrime;
|
||||||
|
|
||||||
|
void DestroyEntity(int32 id);
|
||||||
void PostTerminateGameSpecificShutdown();
|
void PostTerminateGameSpecificShutdown();
|
||||||
bool IsAudioInitialised() const;
|
bool IsAudioInitialised() const;
|
||||||
void SetDynamicAcousticModelingStatus(bool status);
|
void SetDynamicAcousticModelingStatus(bool status);
|
||||||
|
Loading…
Reference in New Issue
Block a user