mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
|
|
#include "../main.h"
|
|
#include "util.h"
|
|
|
|
//-----------------------------------------------------------
|
|
// CONSTRUCTOR
|
|
|
|
CVehicle::CVehicle(int iType, float fPosX, float fPosY,
|
|
float fPosZ, float fRotation, BOOL bKeepModelLoaded,
|
|
int a8)
|
|
{
|
|
// TODO: CVehicle::CVehicle .text:100B88F0
|
|
}
|
|
|
|
//-----------------------------------------------------------
|
|
|
|
void CVehicle::LinkToInterior(int iInterior)
|
|
{
|
|
if(GamePool_Vehicle_GetAt(m_dwGTAId)) {
|
|
ScriptCommand(&link_vehicle_to_interior, m_dwGTAId, iInterior);
|
|
}
|
|
}
|
|
|
|
//-----------------------------------------------------------
|
|
// If the game has internally destroyed the vehicle
|
|
// during this frame, the vehicle pointer should become 0
|
|
|
|
void CVehicle::ResetPointers()
|
|
{
|
|
if(!m_pVehicle) return;
|
|
|
|
m_pVehicle = GamePool_Vehicle_GetAt(m_dwGTAId);
|
|
m_pEntity = (ENTITY_TYPE *)m_pVehicle;
|
|
}
|
|
|
|
//-----------------------------------------------------------
|
|
|
|
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;
|
|
}
|
|
|
|
//-----------------------------------------------------------
|
|
|