diff --git a/saco/game/vehicle.cpp b/saco/game/vehicle.cpp index 646b96d..9c6e26f 100644 --- a/saco/game/vehicle.cpp +++ b/saco/game/vehicle.cpp @@ -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; +} + +//----------------------------------------------------------- + diff --git a/saco/game/vehicle.h b/saco/game/vehicle.h index 8eb44a4..50d537d 100644 --- a/saco/game/vehicle.h +++ b/saco/game/vehicle.h @@ -25,6 +25,9 @@ public: void LinkToInterior(int iInterior); + BOOL IsOccupied(); + + }; //-----------------------------------------------------------