1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2024-12-28 18:35:29 +00:00

fixed crash

This commit is contained in:
Nikolay Korolev 2020-05-26 16:17:40 +03:00
parent 314e56b7b9
commit f40677c7a4

View file

@ -1757,13 +1757,13 @@ CVehicle::SetupPassenger(int n)
if(passenger->m_nPedType == PEDTYPE_CIVMALE || passenger->m_nPedType == PEDTYPE_CIVFEMALE)
for(i = 0; i < n; i++)
if(pPassengers[i] && pPassengers[n] &&
pPassengers[i]->m_nPedType == PEDTYPE_CIVMALE || pPassengers[i]->m_nPedType == PEDTYPE_CIVFEMALE &&
(pPassengers[i]->m_nPedType == PEDTYPE_CIVMALE || pPassengers[i]->m_nPedType == PEDTYPE_CIVFEMALE) &&
passenger->GetModelIndex() == pPassengers[i]->GetModelIndex()){
pPassengers[n] = nil;
CPopulation::RemovePed(passenger);
}
}
if(bIsBus)
if(bIsBus && pPassengers[n])
pPassengers[n]->bRenderPedInCar = false;
++m_nNumPassengers;
return pPassengers[n];