diff options
author | withmorten <morten.with@gmail.com> | 2021-06-28 13:57:05 +0200 |
---|---|---|
committer | withmorten <morten.with@gmail.com> | 2021-06-28 13:57:05 +0200 |
commit | d17d437de319ca4c388dc724cffea91702d3a699 (patch) | |
tree | 806104fa5fe0e994cd7f55f1b7b48dc64a998c44 /src/control/CarCtrl.cpp | |
parent | Redo ReadSaveBuf + common.h cleanup (diff) | |
download | re3-d17d437de319ca4c388dc724cffea91702d3a699.tar re3-d17d437de319ca4c388dc724cffea91702d3a699.tar.gz re3-d17d437de319ca4c388dc724cffea91702d3a699.tar.bz2 re3-d17d437de319ca4c388dc724cffea91702d3a699.tar.lz re3-d17d437de319ca4c388dc724cffea91702d3a699.tar.xz re3-d17d437de319ca4c388dc724cffea91702d3a699.tar.zst re3-d17d437de319ca4c388dc724cffea91702d3a699.zip |
Diffstat (limited to 'src/control/CarCtrl.cpp')
-rw-r--r-- | src/control/CarCtrl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp index 21526d5e..5e4e62ee 100644 --- a/src/control/CarCtrl.cpp +++ b/src/control/CarCtrl.cpp @@ -2575,7 +2575,7 @@ void CCarCtrl::SteerAIBoatWithPhysicsHeadingForTarget(CVehicle* pVehicle, float float angleToTarget = CGeneral::GetATanOfXY(targetX - pVehicle->GetPosition().x, targetY - pVehicle->GetPosition().y); float angleForward = CGeneral::GetATanOfXY(forward.x, forward.y); float steerAngle = LimitRadianAngle(angleToTarget - angleForward); - steerAngle = clamp(steerAngle, -DEFAULT_MAX_STEER_ANGLE, DEFAULT_MAX_STEER_ANGLE); + steerAngle = Clamp(steerAngle, -DEFAULT_MAX_STEER_ANGLE, DEFAULT_MAX_STEER_ANGLE); #ifdef FIX_BUGS float speedTarget = pVehicle->AutoPilot.GetCruiseSpeed(); #else @@ -2735,7 +2735,7 @@ void CCarCtrl::SteerAIPlaneTowardsTargetCoors(CAutomobile* pPlane) { CVector2D vecToTarget = pPlane->AutoPilot.m_vecDestinationCoors - pPlane->GetPosition(); float fForwardZ = (pPlane->AutoPilot.m_vecDestinationCoors.z - pPlane->GetPosition().z) / vecToTarget.Magnitude(); - fForwardZ = clamp(fForwardZ, -0.3f, 0.3f); + fForwardZ = Clamp(fForwardZ, -0.3f, 0.3f); float angle = CGeneral::GetATanOfXY(vecToTarget.x, vecToTarget.y); while (angle > TWOPI) angle -= TWOPI; |