summaryrefslogtreecommitdiffstats
path: root/src/control/CarCtrl.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-08-24 22:46:17 +0200
committerGitHub <noreply@github.com>2020-08-24 22:46:17 +0200
commit8e7989087d93ba51deeca8a2d49629de18d918eb (patch)
treec15b8220c0d69132e90cbd3189d0d37fa30f9f24 /src/control/CarCtrl.cpp
parentFix (diff)
parentCompilation fix (diff)
downloadre3-8e7989087d93ba51deeca8a2d49629de18d918eb.tar
re3-8e7989087d93ba51deeca8a2d49629de18d918eb.tar.gz
re3-8e7989087d93ba51deeca8a2d49629de18d918eb.tar.bz2
re3-8e7989087d93ba51deeca8a2d49629de18d918eb.tar.lz
re3-8e7989087d93ba51deeca8a2d49629de18d918eb.tar.xz
re3-8e7989087d93ba51deeca8a2d49629de18d918eb.tar.zst
re3-8e7989087d93ba51deeca8a2d49629de18d918eb.zip
Diffstat (limited to 'src/control/CarCtrl.cpp')
-rw-r--r--src/control/CarCtrl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 5b2454ac..74c4f006 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -2759,7 +2759,7 @@ void CCarCtrl::SteerAIPlaneTowardsTargetCoors(CAutomobile* pPlane)
float steer = difference > 0.0f ? 0.04f : -0.04f;
if (Abs(difference) < 0.2f)
steer *= 5.0f * Abs(difference);
- pPlane->m_fPlaneSteer *= Pow(0.96, CTimer::GetTimeStep());
+ pPlane->m_fPlaneSteer *= Pow(0.96f, CTimer::GetTimeStep());
float steerChange = steer - pPlane->m_fPlaneSteer;
float maxChange = 0.003f * CTimer::GetTimeStep();
if (Abs(steerChange) < maxChange)
@@ -2782,7 +2782,7 @@ void CCarCtrl::SteerAIPlaneTowardsTargetCoors(CAutomobile* pPlane)
pPlane->GetMatrix().GetRight() = right;
pPlane->GetMatrix().GetForward() = forward;
pPlane->GetMatrix().GetUp() = up;
- float newSplit = 1.0f - Pow(0.95, CTimer::GetTimeStep());
+ float newSplit = 1.0f - Pow(0.95f, CTimer::GetTimeStep());
float oldSplit = 1.0f - newSplit;
#ifdef FIX_BUGS
pPlane->m_vecMoveSpeed = pPlane->m_vecMoveSpeed * oldSplit + pPlane->AutoPilot.GetCruiseSpeed() * 0.01f * forward * newSplit;