[saco] Implement/match GetTaskTypeFromTask(...)

This commit is contained in:
RD42 2024-11-02 22:37:47 +08:00
parent 24b3ff6039
commit 7e6ec7860f
2 changed files with 21 additions and 0 deletions

View File

@ -1376,6 +1376,26 @@ DWORD * GetNextTaskFromTask(DWORD *task)
//----------------------------------------------------------- //-----------------------------------------------------------
int GetTaskTypeFromTask(DWORD *task)
{
int i = 0;
if(!task || *task < 0x800000 || *task > 0x900000) return 0;
_asm pushad
_asm mov edx, task
_asm mov ebx, [edx]
_asm mov edx, [ebx+10h]
_asm mov ecx, task
_asm call edx
_asm mov i, eax
_asm popad
return i;
}
//-----------------------------------------------------------
BOOL __stdcall GameIsEntityOnScreen(DWORD * pdwEnt) BOOL __stdcall GameIsEntityOnScreen(DWORD * pdwEnt)
{ {
BOOL bResult = FALSE; BOOL bResult = FALSE;

View File

@ -74,4 +74,5 @@ void RemoveColorEmbedsFromString(char *szString);
UINT GetVehicleSubtypeFromVehiclePtr(VEHICLE_TYPE *pVehicle); UINT GetVehicleSubtypeFromVehiclePtr(VEHICLE_TYPE *pVehicle);
DWORD * GetNextTaskFromTask(DWORD *task); DWORD * GetNextTaskFromTask(DWORD *task);
int GetTaskTypeFromTask(DWORD *task);