Skip to content
Permalink
Browse files

Disable unloading default GTA IFP blocks

We are disabling this temporarily for testing.
  • Loading branch information...
codenulls committed Aug 3, 2019
1 parent 4a1aadf commit 9728a27c4354aa9fbe13cec58729aeaa41556013
Showing with 12 additions and 0 deletions.
  1. +11 −0 Client/multiplayer_sa/CMultiplayerSA.cpp
  2. +1 −0 Client/multiplayer_sa/CMultiplayerSA.h
@@ -1494,6 +1494,8 @@ void CMultiplayerSA::InitHooks()
MemSet((void*)0x72925D, 0x1, 1); // objects
MemSet((void*)0x729263, 0x1, 1); // players

DisableUnloadingIFPBlocks();

InitHooks_CrashFixHacks();

// Init our 1.3 hooks.
@@ -2350,6 +2352,15 @@ void CMultiplayerSA::SetCenterOfWorld(CEntity* entity, CVector* vecPosition, FLO
}
}

void CMultiplayerSA::DisableUnloadingIFPBlocks()
{
// 32 C0 : xor al, al
// C3 : retn
unsigned char newBytes[5] = { 0x32, 0xC0, 0xC3, 0x90, 0x90 };
DWORD AddressOfCStreaming__AreAnimsUsedByRequestedModels = 0x407AD0;
MemCpy((void*)AddressOfCStreaming__AreAnimsUsedByRequestedModels, newBytes, sizeof(newBytes));
}

void _declspec(naked) HOOK_FindPlayerCoors()
{
_asm
@@ -94,6 +94,7 @@ class CMultiplayerSA : public CMultiplayer
void DisableQuickReload(bool bDisable);
void DisableCloseRangeDamage(bool bDisable);
void DisableBadDrivebyHitboxes(bool bDisable) { m_bBadDrivebyHitboxesDisabled = bDisable; }
void DisableUnloadingIFPBlocks();

bool GetExplosionsDisabled();
void DisableExplosions(bool bDisabled);

0 comments on commit 9728a27

Please sign in to comment.
You can’t perform that action at this time.