From 007f7729f99c5966bfbd653cecb29fccb452686e Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Wed, 30 Oct 2024 18:22:13 +0800 Subject: [PATCH] [saco] Implement/match `CActorPed::IsInVehicle()` --- saco/game/actorped.cpp | 12 ++++++++++++ saco/game/actorped.h | 1 + 2 files changed, 13 insertions(+) diff --git a/saco/game/actorped.cpp b/saco/game/actorped.cpp index e8844c0..560e731 100644 --- a/saco/game/actorped.cpp +++ b/saco/game/actorped.cpp @@ -202,3 +202,15 @@ void CActorPed::SetActionTrigger(BYTE byteTrigger) //----------------------------------------------------------- +BOOL CActorPed::IsInVehicle() +{ + if(!m_pPed) return FALSE; + + if(IN_VEHICLE(m_pPed)) { + return TRUE; + } + return FALSE; +} + +//----------------------------------------------------------- + diff --git a/saco/game/actorped.h b/saco/game/actorped.h index fae7b8a..2c8167b 100644 --- a/saco/game/actorped.h +++ b/saco/game/actorped.h @@ -23,6 +23,7 @@ public: BOOL IsDead(); BYTE GetActionTrigger(); void SetActionTrigger(BYTE byteTrigger); + BOOL IsInVehicle(); void ApplyAnimation(char *szAnimName, char *szAnimFile, float fT, int opt1, int opt2, int opt3, int opt4, int iUnk);