From b2d28335a3fe91ad5daa67c8fe79a72ab8d027a8 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Tue, 15 Oct 2024 17:18:06 +0800 Subject: [PATCH] [saco] Implement/match `CPlayerPed::GetGtaContactVehicle()` --- saco/game/playerped.cpp | 7 +++++++ saco/game/playerped.h | 1 + 2 files changed, 8 insertions(+) diff --git a/saco/game/playerped.cpp b/saco/game/playerped.cpp index 4fcf734..dc0d0a3 100644 --- a/saco/game/playerped.cpp +++ b/saco/game/playerped.cpp @@ -921,3 +921,10 @@ ENTITY_TYPE* CPlayerPed::GetGtaContactEntity() //----------------------------------------------------------- +VEHICLE_TYPE* CPlayerPed::GetGtaContactVehicle() +{ + return (VEHICLE_TYPE*)m_pPed->pContactVehicle; +} + +//----------------------------------------------------------- + diff --git a/saco/game/playerped.h b/saco/game/playerped.h index e3ea70a..501bc40 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -68,6 +68,7 @@ public: BOOL IsAPassenger(); VEHICLE_TYPE * GetGtaVehicle(); + VEHICLE_TYPE * GetGtaContactVehicle(); ENTITY_TYPE * GetGtaContactEntity(); float GetDistanceFromVehicle(CVehicle *pVehicle);