mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-16 00:18:59 +00:00
fixed crash
This commit is contained in:
parent
314e56b7b9
commit
f40677c7a4
1 changed files with 2 additions and 2 deletions
|
@ -1757,13 +1757,13 @@ CVehicle::SetupPassenger(int n)
|
||||||
if(passenger->m_nPedType == PEDTYPE_CIVMALE || passenger->m_nPedType == PEDTYPE_CIVFEMALE)
|
if(passenger->m_nPedType == PEDTYPE_CIVMALE || passenger->m_nPedType == PEDTYPE_CIVFEMALE)
|
||||||
for(i = 0; i < n; i++)
|
for(i = 0; i < n; i++)
|
||||||
if(pPassengers[i] && pPassengers[n] &&
|
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()){
|
passenger->GetModelIndex() == pPassengers[i]->GetModelIndex()){
|
||||||
pPassengers[n] = nil;
|
pPassengers[n] = nil;
|
||||||
CPopulation::RemovePed(passenger);
|
CPopulation::RemovePed(passenger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(bIsBus)
|
if(bIsBus && pPassengers[n])
|
||||||
pPassengers[n]->bRenderPedInCar = false;
|
pPassengers[n]->bRenderPedInCar = false;
|
||||||
++m_nNumPassengers;
|
++m_nNumPassengers;
|
||||||
return pPassengers[n];
|
return pPassengers[n];
|
||||||
|
|
Loading…
Reference in a new issue