mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match CPlayerPed::IsFalling()
This commit is contained in:
parent
975fdd589e
commit
38470a88e1
@ -74,7 +74,12 @@ typedef struct _WEAPON_SLOT_TYPE
|
||||
#pragma pack(1)
|
||||
typedef struct _PED_TASKS_TYPE
|
||||
{
|
||||
char _gap0[16];
|
||||
char _gap0[4];
|
||||
|
||||
// Basic Tasks
|
||||
DWORD * pdwDamage;
|
||||
|
||||
char _gap8[8];
|
||||
|
||||
DWORD * pdwJumpJetPack;
|
||||
|
||||
|
@ -979,6 +979,17 @@ BOOL CPlayerPed::IsFighting()
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
BOOL CPlayerPed::IsFalling()
|
||||
{
|
||||
if(m_pPed && !IN_VEHICLE(m_pPed) && m_pPed->Tasks->pdwDamage)
|
||||
{
|
||||
return GetTaskTypeFromTask(m_pPed->Tasks->pdwDamage) == 208;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
void CPlayerPed::StartJetpack()
|
||||
{
|
||||
if(!m_pPed) return;
|
||||
|
@ -110,6 +110,7 @@ public:
|
||||
|
||||
BOOL IsJumping();
|
||||
BOOL IsFighting();
|
||||
BOOL IsFalling();
|
||||
|
||||
float GetAimZ();
|
||||
void SetAimZ(float fAimZ);
|
||||
|
Loading…
Reference in New Issue
Block a user