summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-26 15:17:40 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-26 15:17:40 +0200
commitf40677c7a4f12306c202bad8966bb19d993422ad (patch)
tree4e17f69a874c82289c4e00157edf8b712a27ae63
parentfix2 (diff)
downloadre3-f40677c7a4f12306c202bad8966bb19d993422ad.tar
re3-f40677c7a4f12306c202bad8966bb19d993422ad.tar.gz
re3-f40677c7a4f12306c202bad8966bb19d993422ad.tar.bz2
re3-f40677c7a4f12306c202bad8966bb19d993422ad.tar.lz
re3-f40677c7a4f12306c202bad8966bb19d993422ad.tar.xz
re3-f40677c7a4f12306c202bad8966bb19d993422ad.tar.zst
re3-f40677c7a4f12306c202bad8966bb19d993422ad.zip
-rw-r--r--src/vehicles/Vehicle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index a6f8719e..1dc7af11 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -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];