summaryrefslogtreecommitdiffstats
path: root/src/control/CarCtrl.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-12-12 18:37:26 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-12-12 18:37:26 +0100
commit229b8f304a4b1ddb64b45c0d14cffad4c1438f69 (patch)
treede0f639fb63b42022bc05cc76e525f6ca396b29e /src/control/CarCtrl.cpp
parentquick fix (diff)
downloadre3-229b8f304a4b1ddb64b45c0d14cffad4c1438f69.tar
re3-229b8f304a4b1ddb64b45c0d14cffad4c1438f69.tar.gz
re3-229b8f304a4b1ddb64b45c0d14cffad4c1438f69.tar.bz2
re3-229b8f304a4b1ddb64b45c0d14cffad4c1438f69.tar.lz
re3-229b8f304a4b1ddb64b45c0d14cffad4c1438f69.tar.xz
re3-229b8f304a4b1ddb64b45c0d14cffad4c1438f69.tar.zst
re3-229b8f304a4b1ddb64b45c0d14cffad4c1438f69.zip
Diffstat (limited to 'src/control/CarCtrl.cpp')
-rw-r--r--src/control/CarCtrl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index d4691e2b..8f6330b3 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -2856,7 +2856,11 @@ void CCarCtrl::SteerAICarWithPhysicsFollowPath(CVehicle* pVehicle, float* pSwerv
case DRIVINGSTYLE_STOP_FOR_CARS:
case DRIVINGSTYLE_SLOW_DOWN_FOR_CARS:
case DRIVINGSTYLE_STOP_FOR_CARS_IGNORE_LIGHTS:
- speedStyleMultiplier = FindMaximumSpeedForThisCarInTraffic(pVehicle) / pVehicle->AutoPilot.m_nCruiseSpeed;
+ speedStyleMultiplier = FindMaximumSpeedForThisCarInTraffic(pVehicle);
+#ifdef FIX_BUGS
+ if (pVehicle->AutoPilot.m_nCruiseSpeed != 0)
+#endif
+ speedStyleMultiplier /= pVehicle->AutoPilot.m_nCruiseSpeed;
break;
default:
speedStyleMultiplier = 1.0f;