summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-09-14 20:06:10 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-09-14 20:06:10 +0200
commit67701df91f179f9b73305924e6d27db18f3010fe (patch)
treee82c3293769fd12d24b07493d5a8d98794194e13 /src
parentfix typo (diff)
downloadre3-67701df91f179f9b73305924e6d27db18f3010fe.tar
re3-67701df91f179f9b73305924e6d27db18f3010fe.tar.gz
re3-67701df91f179f9b73305924e6d27db18f3010fe.tar.bz2
re3-67701df91f179f9b73305924e6d27db18f3010fe.tar.lz
re3-67701df91f179f9b73305924e6d27db18f3010fe.tar.xz
re3-67701df91f179f9b73305924e6d27db18f3010fe.tar.zst
re3-67701df91f179f9b73305924e6d27db18f3010fe.zip
Diffstat (limited to 'src')
-rw-r--r--src/control/CarCtrl.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 6f695d00..f89b9306 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -2019,16 +2019,13 @@ void CCarCtrl::DragCarToPoint(CVehicle* pVehicle, CVector* pPoint)
float CCarCtrl::FindSpeedMultiplier(float angleChange, float minAngle, float maxAngle, float coef)
{
- float actual = ((float(*)(float, float, float, float))(0x41D980))(angleChange, minAngle, maxAngle, coef);
float angle = Abs(LimitRadianAngle(angleChange));
float n = angle - minAngle;
n = max(0.0f, n);
float d = maxAngle - minAngle;
float mult = 1.0f - n / d * (1.0f - coef);
if (n > d)
- return coef == actual ? coef : ASSERT(0), coef;
- if (ABS(mult - actual) > 0.01f)
- ASSERT(0);
+ return coef;
return mult;
}