[saco] Implement/match CVehicle::HasADriver()

This commit is contained in:
RD42 2024-08-20 22:51:36 +08:00
parent 003f3f22d0
commit d9f2fc7766
2 changed files with 16 additions and 0 deletions

View File

@ -35,3 +35,17 @@ void CVehicle::ResetPointers()
//-----------------------------------------------------------
BOOL CVehicle::HasADriver()
{
if(!m_pVehicle) return FALSE;
if(!GamePool_Vehicle_GetAt(m_dwGTAId)) return FALSE;
if(m_pVehicle) {
if(m_pVehicle->pDriver && IN_VEHICLE(m_pVehicle->pDriver) && m_pVehicle->pDriver->dwPedType == 0)
return TRUE;
}
return FALSE;
}
//-----------------------------------------------------------

View File

@ -20,6 +20,8 @@ public:
void ResetPointers();
BOOL HasADriver();
void LinkToInterior(int iInterior);