[saco] Implement/match CPlayerPed::DestroyFollowPedTask()

This commit is contained in:
RD42 2024-11-02 22:58:45 +08:00
parent 42647cce48
commit 1b62a8d3c4
3 changed files with 24 additions and 1 deletions

View File

@ -89,6 +89,9 @@ typedef struct _PED_TASKS_TYPE
// Extended Tasks
DWORD * pdwFighting;
char _gap1C[16];
DWORD * pdwIK;
} PED_TASKS_TYPE;
//-----------------------------------------------------------

View File

@ -1265,7 +1265,7 @@ void CPlayerPed::ApplyCommandTask(char *szTaskName, int p1, int p2, int p3,
DWORD dwPed = (DWORD)m_pPed;
if(!dwPed) return;
_asm push p9
_asm push p9
_asm push p8
_asm push p7
_asm push p6
@ -1283,6 +1283,24 @@ void CPlayerPed::ApplyCommandTask(char *szTaskName, int p1, int p2, int p3,
//-----------------------------------------------------------
DWORD dwExt4;
void CPlayerPed::DestroyFollowPedTask()
{
if(!m_pPed) return;
dwExt4 = (DWORD)m_pPed->Tasks->pdwIK;
if(!dwExt4) return;
_asm mov ecx, dwExt4
_asm mov edx, 0x639330
_asm push 1
_asm call edx
m_pPed->Tasks->pdwIK = 0;
}
//-----------------------------------------------------------
void CPlayerPed::ProcessVehicleHorn()
{
if(!m_pPed) return;

View File

@ -113,6 +113,8 @@ public:
void ApplyCommandTask(char *szTaskName, int p1, int p2, int p3,
VECTOR *p4, int p5, float p6, int p7, int p8, int p9);
void DestroyFollowPedTask();
BOOL IsJumping();
BOOL IsFighting();
BOOL IsFalling();