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