Skip to content
Permalink
Browse files

Revert "Disable unloading default GTA IFP blocks"

This reverts commit 9728a27.
  • Loading branch information...
codenulls committed Aug 5, 2019
1 parent bc649fb commit a844b21d8ab1c3a4e4c631d921a5f5938d1e3dd1
Showing with 0 additions and 12 deletions.
  1. +0 −11 Client/multiplayer_sa/CMultiplayerSA.cpp
  2. +0 −1 Client/multiplayer_sa/CMultiplayerSA.h
@@ -1494,8 +1494,6 @@ void CMultiplayerSA::InitHooks()
MemSet((void*)0x72925D, 0x1, 1); // objects
MemSet((void*)0x729263, 0x1, 1); // players

DisableUnloadingIFPBlocks();

InitHooks_CrashFixHacks();

// Init our 1.3 hooks.
@@ -2352,15 +2350,6 @@ 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,7 +94,6 @@ 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);

1 comment on commit a844b21

@saml1er

This comment has been minimized.

Copy link
Member

commented on a844b21 Aug 5, 2019

Reverted because it was crashing the client and highly unstable. Rewrote the code in 1e234b6

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