[saco] Implement/match CPlayerPed::GetGtaContactEntity()

This commit is contained in:
RD42 2024-10-15 17:16:42 +08:00
parent 75d5dcc38d
commit 0fba86e33f
3 changed files with 18 additions and 1 deletions

View File

@ -140,7 +140,15 @@ typedef struct _PED_TYPE
float fRotation1; // 1368-1372 float fRotation1; // 1368-1372
float fRotation2; // 1372-1376 float fRotation2; // 1372-1376
char _gap560[44]; char _gap560[8];
DWORD pContactVehicle; // 1384 - 1388
char _gap56C[24];
DWORD pContactEntity; // 1412 - 1416
char _gap588[4];
DWORD pVehicle; // 1420-1424 DWORD pVehicle; // 1420-1424

View File

@ -913,3 +913,11 @@ void CPlayerPed::SetAimZ(float fAimZ)
} }
//----------------------------------------------------------- //-----------------------------------------------------------
ENTITY_TYPE* CPlayerPed::GetGtaContactEntity()
{
return (ENTITY_TYPE*)m_pPed->pContactEntity;
}
//-----------------------------------------------------------

View File

@ -68,6 +68,7 @@ public:
BOOL IsAPassenger(); BOOL IsAPassenger();
VEHICLE_TYPE * GetGtaVehicle(); VEHICLE_TYPE * GetGtaVehicle();
ENTITY_TYPE * GetGtaContactEntity();
float GetDistanceFromVehicle(CVehicle *pVehicle); float GetDistanceFromVehicle(CVehicle *pVehicle);