mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47: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)
|
#pragma pack(1)
|
||||||
typedef struct _PED_TASKS_TYPE
|
typedef struct _PED_TASKS_TYPE
|
||||||
{
|
{
|
||||||
char _gap0[16];
|
char _gap0[4];
|
||||||
|
|
||||||
|
// Basic Tasks
|
||||||
|
DWORD * pdwDamage;
|
||||||
|
|
||||||
|
char _gap8[8];
|
||||||
|
|
||||||
DWORD * pdwJumpJetPack;
|
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()
|
void CPlayerPed::StartJetpack()
|
||||||
{
|
{
|
||||||
if(!m_pPed) return;
|
if(!m_pPed) return;
|
||||||
|
@ -110,6 +110,7 @@ public:
|
|||||||
|
|
||||||
BOOL IsJumping();
|
BOOL IsJumping();
|
||||||
BOOL IsFighting();
|
BOOL IsFighting();
|
||||||
|
BOOL IsFalling();
|
||||||
|
|
||||||
float GetAimZ();
|
float GetAimZ();
|
||||||
void SetAimZ(float fAimZ);
|
void SetAimZ(float fAimZ);
|
||||||
|
Loading…
Reference in New Issue
Block a user