From 3bf84844a34cbf765ad8c46f2671b87c1b48198e Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Sat, 2 Nov 2024 23:04:47 +0800 Subject: [PATCH] [saco] Implement/match `CPlayerPed::GetFightingStyle()` --- saco/game/common.h | 4 ++++ saco/game/playerped.cpp | 8 ++++++++ saco/game/playerped.h | 2 ++ 3 files changed, 14 insertions(+) diff --git a/saco/game/common.h b/saco/game/common.h index a1770c5..1b845f2 100644 --- a/saco/game/common.h +++ b/saco/game/common.h @@ -181,6 +181,10 @@ typedef struct _PED_TYPE BYTE byteCurWeaponSlot; // 1816-1817 + char _gap719[20]; + + BYTE byteFightingStyle; // 1837-1838 + } PED_TYPE; //----------------------------------------------------------- diff --git a/saco/game/playerped.cpp b/saco/game/playerped.cpp index 00f8b81..c3fbb83 100644 --- a/saco/game/playerped.cpp +++ b/saco/game/playerped.cpp @@ -1317,6 +1317,14 @@ int CPlayerPed::IsCellphoneEnabled() //----------------------------------------------------------- +int CPlayerPed::GetFightingStyle() +{ + if (!m_pPed) return 0; + return m_pPed->byteFightingStyle; +} + +//----------------------------------------------------------- + void CPlayerPed::ProcessVehicleHorn() { if(!m_pPed) return; diff --git a/saco/game/playerped.h b/saco/game/playerped.h index 8bd4664..94e6d7d 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -52,6 +52,8 @@ public: WORD GetAmmo(); + int GetFightingStyle(); + float GetTargetRotation(); void SetTargetRotation(float fRotation); void ForceTargetRotation(float fRotation);