summaryrefslogtreecommitdiffstats
path: root/src/control/CarCtrl.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-12-12 19:06:14 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-12-12 19:06:14 +0100
commitbfe382c315636b830f5a69bbf82cfb66f9463aaa (patch)
tree26830eb8d41fde915e0e9c1bfd34e3320bf2157d /src/control/CarCtrl.cpp
parentstyle change (diff)
downloadre3-bfe382c315636b830f5a69bbf82cfb66f9463aaa.tar
re3-bfe382c315636b830f5a69bbf82cfb66f9463aaa.tar.gz
re3-bfe382c315636b830f5a69bbf82cfb66f9463aaa.tar.bz2
re3-bfe382c315636b830f5a69bbf82cfb66f9463aaa.tar.lz
re3-bfe382c315636b830f5a69bbf82cfb66f9463aaa.tar.xz
re3-bfe382c315636b830f5a69bbf82cfb66f9463aaa.tar.zst
re3-bfe382c315636b830f5a69bbf82cfb66f9463aaa.zip
Diffstat (limited to 'src/control/CarCtrl.cpp')
-rw-r--r--src/control/CarCtrl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 8f6330b3..e63da83a 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -2858,9 +2858,11 @@ void CCarCtrl::SteerAICarWithPhysicsFollowPath(CVehicle* pVehicle, float* pSwerv
case DRIVINGSTYLE_STOP_FOR_CARS_IGNORE_LIGHTS:
speedStyleMultiplier = FindMaximumSpeedForThisCarInTraffic(pVehicle);
#ifdef FIX_BUGS
- if (pVehicle->AutoPilot.m_nCruiseSpeed != 0)
+ if (pVehicle->AutoPilot.GetCruiseSpeed() != 0)
+ speedStyleMultiplier /= pVehicle->AutoPilot.GetCruiseSpeed();
+#else
+ speedStyleMultiplier /= pVehicle->AutoPilot.m_nCruiseSpeed;
#endif
- speedStyleMultiplier /= pVehicle->AutoPilot.m_nCruiseSpeed;
break;
default:
speedStyleMultiplier = 1.0f;