Merge pull request #561 from Nick007J/miami

script revision
This commit is contained in:
aap
2020-05-19 13:26:21 +02:00
committed by GitHub
15 changed files with 236 additions and 123 deletions

View File

@ -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;
}