[saco] Implement/match GenTaskAlloc_Hook()

This commit is contained in:
RD42 2024-10-14 18:10:47 +08:00
parent 963daecaf8
commit d2fe290b96

View File

@ -36,6 +36,10 @@ DWORD dwSavedCheatFn=0;
float fFarClip=1400.0f; float fFarClip=1400.0f;
DWORD dwParam1;
DWORD dwParam2;
DWORD dwParamThis;
DWORD unnamed_101516D4; DWORD unnamed_101516D4;
WORD wLastRendObj=0; WORD wLastRendObj=0;
@ -541,6 +545,30 @@ exitFn:
} }
} }
//-----------------------------------------------------------
NUDE GenTaskAlloc_Hook()
{
_asm mov edi, [esp+4]
_asm mov dwParam1, edi
//_asm mov edx, [esp+8]
//_asm mov dwParam2, edx
_asm mov dwParamThis, ecx
_asm pushad
_asm mov edx, [edi]
_asm mov ecx, edi
_asm call dword ptr [edx+4]
_asm mov dwParam2, eax
//pChatWindow->AddDebugMessage("TaskAlloc: 0x%X, 0x%X, 0x%X",dwParamThis,dwParam1,dwParam2);
_asm popad
_asm mov eax, fs:0
_asm mov edx, 0x4C3876
_asm jmp edx
}
//----------------------------------------------------------- //-----------------------------------------------------------
// used for correct report message using 100A1790 ; void __thiscall CGame::PlayCrimeReport // used for correct report message using 100A1790 ; void __thiscall CGame::PlayCrimeReport