summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2021-08-15 22:30:25 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2021-08-15 22:32:10 +0200
commit9ba2f7d43c9b37d3c075aa450c31b3fd052e2b88 (patch)
tree6c813832eb6e020ef00656f6d4485a1e1781ce4c
parentmerged correct switch (diff)
downloadre3-9ba2f7d43c9b37d3c075aa450c31b3fd052e2b88.tar
re3-9ba2f7d43c9b37d3c075aa450c31b3fd052e2b88.tar.gz
re3-9ba2f7d43c9b37d3c075aa450c31b3fd052e2b88.tar.bz2
re3-9ba2f7d43c9b37d3c075aa450c31b3fd052e2b88.tar.lz
re3-9ba2f7d43c9b37d3c075aa450c31b3fd052e2b88.tar.xz
re3-9ba2f7d43c9b37d3c075aa450c31b3fd052e2b88.tar.zst
re3-9ba2f7d43c9b37d3c075aa450c31b3fd052e2b88.zip
-rw-r--r--src/control/CarCtrl.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 026a2057..2bedaec2 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -1586,7 +1586,7 @@ void CCarCtrl::WeaveThroughCarsSectorList(CPtrList& lst, CVehicle* pVehicle, CPh
continue;
if (Abs(pTestVehicle->GetPosition().z - pVehicle->GetPosition().z) >= VEHICLE_HEIGHT_DIFF_TO_CONSIDER_WEAVING)
continue;
- if (pTestVehicle != pVehicle)
+ if (pTestVehicle != pVehicle && (!pVehicle->bPartOfConvoy || !pTestVehicle->bPartOfConvoy))
WeaveForOtherCar(pTestVehicle, pVehicle, pAngleToWeaveLeft, pAngleToWeaveRight);
}
}
@@ -1594,8 +1594,6 @@ void CCarCtrl::WeaveThroughCarsSectorList(CPtrList& lst, CVehicle* pVehicle, CPh
void CCarCtrl::WeaveForOtherCar(CEntity* pOtherEntity, CVehicle* pVehicle, float* pAngleToWeaveLeft, float* pAngleToWeaveRight)
{
CVehicle* pOtherCar = (CVehicle*)pOtherEntity;
- if (pVehicle->bPartOfConvoy && pOtherCar->bPartOfConvoy)
- return;
if (pVehicle->AutoPilot.m_nCarMission == MISSION_RAMPLAYER_CLOSE && pOtherEntity == FindPlayerVehicle())
return;
if (pVehicle->AutoPilot.m_nCarMission == MISSION_RAMCAR_CLOSE && pOtherEntity == pVehicle->AutoPilot.m_pTargetCar)