summaryrefslogtreecommitdiffstats
path: root/src/control/CarAI.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-02-15 21:30:51 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-02-15 21:30:51 +0100
commit85d815cf9d9eeaa7199e56be09e6d2878ff9d135 (patch)
treeaa733429e2b1a8bdab781cd8cbc69807716f8c7c /src/control/CarAI.cpp
parentsync with upstream (diff)
downloadre3-85d815cf9d9eeaa7199e56be09e6d2878ff9d135.tar
re3-85d815cf9d9eeaa7199e56be09e6d2878ff9d135.tar.gz
re3-85d815cf9d9eeaa7199e56be09e6d2878ff9d135.tar.bz2
re3-85d815cf9d9eeaa7199e56be09e6d2878ff9d135.tar.lz
re3-85d815cf9d9eeaa7199e56be09e6d2878ff9d135.tar.xz
re3-85d815cf9d9eeaa7199e56be09e6d2878ff9d135.tar.zst
re3-85d815cf9d9eeaa7199e56be09e6d2878ff9d135.zip
Diffstat (limited to '')
-rw-r--r--src/control/CarAI.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/control/CarAI.cpp b/src/control/CarAI.cpp
index 870a094d..c5d62c48 100644
--- a/src/control/CarAI.cpp
+++ b/src/control/CarAI.cpp
@@ -265,9 +265,16 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
break;
case MISSION_RAMCAR_CLOSE:
if (pVehicle->AutoPilot.m_pTargetCar){
- /* PlayerPed? */
- if (FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone || pVehicle->bIsLawEnforcer &&
- (FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice())){
+ if
+#ifdef FIX_BUGS
+ (FindPlayerVehicle() == pVehicle->AutoPilot.m_pTargetCar &&
+#endif
+ (FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone || pVehicle->bIsLawEnforcer &&
+ (FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice()))
+#ifdef FIX_BUGS
+ )
+#endif
+ {
CCarCtrl::JoinCarWithRoadSystem(pVehicle);
pVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE;
pVehicle->AutoPilot.m_nDrivingStyle = DRIVINGSTYLE_STOP_FOR_CARS;