diff --git a/saco/game/common.h b/saco/game/common.h index af4aba1..a1770c5 100644 --- a/saco/game/common.h +++ b/saco/game/common.h @@ -89,6 +89,9 @@ typedef struct _PED_TASKS_TYPE // Extended Tasks DWORD * pdwFighting; + char _gap1C[16]; + + DWORD * pdwIK; } PED_TASKS_TYPE; //----------------------------------------------------------- diff --git a/saco/game/playerped.cpp b/saco/game/playerped.cpp index 57bb5bc..6e81aa1 100644 --- a/saco/game/playerped.cpp +++ b/saco/game/playerped.cpp @@ -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; diff --git a/saco/game/playerped.h b/saco/game/playerped.h index 0211c71..638b0e9 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -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();