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

This commit is contained in:
RD42 2024-11-02 22:36:15 +08:00
parent 5aa26948af
commit 24b3ff6039
2 changed files with 22 additions and 0 deletions

View File

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

View File

@ -73,3 +73,5 @@ void RemoveColorEmbedsFromString(char *szString);
UINT GetVehicleSubtypeFromVehiclePtr(VEHICLE_TYPE *pVehicle); UINT GetVehicleSubtypeFromVehiclePtr(VEHICLE_TYPE *pVehicle);
DWORD * GetNextTaskFromTask(DWORD *task);