summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-12-12 18:37:12 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-12-12 18:37:12 +0100
commit347e1da364eccf00c572839b9f6571a156f8dda2 (patch)
treefdcb47416695b85ed8a7f91130c72d44bf558188
parentKill obj. fix & style change (diff)
parentfixed a bug (diff)
downloadre3-347e1da364eccf00c572839b9f6571a156f8dda2.tar
re3-347e1da364eccf00c572839b9f6571a156f8dda2.tar.gz
re3-347e1da364eccf00c572839b9f6571a156f8dda2.tar.bz2
re3-347e1da364eccf00c572839b9f6571a156f8dda2.tar.lz
re3-347e1da364eccf00c572839b9f6571a156f8dda2.tar.xz
re3-347e1da364eccf00c572839b9f6571a156f8dda2.tar.zst
re3-347e1da364eccf00c572839b9f6571a156f8dda2.zip
Diffstat (limited to '')
-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 520efe75..cb4229eb 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -2338,7 +2338,11 @@ void CCarCtrl::SteerAICarWithPhysicsFollowPath(CVehicle* pVehicle, float* pSwerv
switch (pVehicle->AutoPilot.m_nDrivingStyle) {
case DRIVINGSTYLE_STOP_FOR_CARS:
case DRIVINGSTYLE_SLOW_DOWN_FOR_CARS:
- 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;