mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-13 20:40:33 +00:00
commit
6b0b984909
15 changed files with 236 additions and 123 deletions
|
@ -1378,3 +1378,18 @@ CVehicle::GetVehicleAppearance(void)
|
|||
return VEHICLE_APPEARANCE_HELI;
|
||||
return VEHICLE_APPEARANCE_NONE;
|
||||
}
|
||||
|
||||
bool
|
||||
IsVehiclePointerValid(CVehicle* pVehicle)
|
||||
{
|
||||
if (!pVehicle)
|
||||
return false;
|
||||
int index = CPools::GetVehiclePool()->GetJustIndex(pVehicle);
|
||||
#ifdef FIX_BUGS
|
||||
if (index < 0 || index >= NUMVEHICLES)
|
||||
#else
|
||||
if (index < 0 || index > NUMVEHICLES)
|
||||
#endif
|
||||
return false;
|
||||
return pVehicle->m_vehType == VEHICLE_TYPE_PLANE || pVehicle->m_entryInfoList.first;
|
||||
}
|
||||
|
|
|
@ -314,3 +314,4 @@ public:
|
|||
};
|
||||
|
||||
void DestroyVehicleAndDriverAndPassengers(CVehicle* pVehicle);
|
||||
bool IsVehiclePointerValid(CVehicle* pVehicle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue