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

This commit is contained in:
RD42 2024-08-20 22:52:44 +08:00
parent d9f2fc7766
commit fdbaa2a9e6
2 changed files with 20 additions and 0 deletions

View File

@ -49,3 +49,20 @@ BOOL CVehicle::HasADriver()
//-----------------------------------------------------------
BOOL CVehicle::IsOccupied()
{
if(m_pVehicle) {
if(m_pVehicle->pDriver) return TRUE;
if(m_pVehicle->pPassengers[0]) return TRUE;
if(m_pVehicle->pPassengers[1]) return TRUE;
if(m_pVehicle->pPassengers[2]) return TRUE;
if(m_pVehicle->pPassengers[3]) return TRUE;
if(m_pVehicle->pPassengers[4]) return TRUE;
if(m_pVehicle->pPassengers[5]) return TRUE;
if(m_pVehicle->pPassengers[6]) return TRUE;
}
return FALSE;
}
//-----------------------------------------------------------

View File

@ -25,6 +25,9 @@ public:
void LinkToInterior(int iInterior);
BOOL IsOccupied();
};
//-----------------------------------------------------------