diff options
Diffstat (limited to 'src/control')
-rw-r--r-- | src/control/CarCtrl.cpp | 4 | ||||
-rw-r--r-- | src/control/OnscreenTimer.cpp | 4 | ||||
-rw-r--r-- | src/control/OnscreenTimer.h | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp index 209a5e21..ab7a4aa1 100644 --- a/src/control/CarCtrl.cpp +++ b/src/control/CarCtrl.cpp @@ -2421,8 +2421,8 @@ void CCarCtrl::SteerAIBoatWithPhysicsHeadingForTarget(CBoat* pBoat, float target float angleForward = CGeneral::GetATanOfXY(forward.x, forward.y); float angleDiff = LimitRadianAngle(angleToTarget - angleForward); angleDiff = min(DEFAULT_MAX_STEER_ANGLE, max(-DEFAULT_MAX_STEER_ANGLE, angleDiff)); - float currentSpeed = pBoat->GetMoveSpeed().Magnitude(); // +0.0f for some reason - float speedDiff = pBoat->AutoPilot.m_nCruiseSpeed - currentSpeed; + float currentSpeed = pBoat->GetMoveSpeed().Magnitude2D(); // +0.0f for some reason + float speedDiff = pBoat->AutoPilot.m_nCruiseSpeed - currentSpeed * 60.0f; if (speedDiff > 0.0f){ float accRemaining = speedDiff / pBoat->AutoPilot.m_nCruiseSpeed; *pAccel = (accRemaining > 0.25f) ? 1.0f : 1.0f - (0.25f - accRemaining) * 4.0f; diff --git a/src/control/OnscreenTimer.cpp b/src/control/OnscreenTimer.cpp index 12aa2923..1677df06 100644 --- a/src/control/OnscreenTimer.cpp +++ b/src/control/OnscreenTimer.cpp @@ -19,7 +19,7 @@ void COnscreenTimer::Init() { m_sEntries[i].m_aCounterText[j] = 0; } - m_sEntries[i].m_nType = 0; + m_sEntries[i].m_nType = COUNTER_DISPLAY_NUMBER; m_sEntries[i].m_bTimerProcessed = 0; m_sEntries[i].m_bCounterProcessed = 0; } @@ -49,7 +49,7 @@ void COnscreenTimer::ClearCounter(uint32 offset) { if(offset == m_sEntries[i].m_nCounterOffset) { m_sEntries[i].m_nCounterOffset = 0; m_sEntries[i].m_aCounterText[0] = 0; - m_sEntries[i].m_nType = 0; + m_sEntries[i].m_nType = COUNTER_DISPLAY_NUMBER; m_sEntries[i].m_bCounterProcessed = 0; } } diff --git a/src/control/OnscreenTimer.h b/src/control/OnscreenTimer.h index bf92b988..b1e0e622 100644 --- a/src/control/OnscreenTimer.h +++ b/src/control/OnscreenTimer.h @@ -1,5 +1,11 @@ #pragma once
+enum
+{
+ COUNTER_DISPLAY_NUMBER,
+ COUNTER_DISPLAY_BAR,
+};
+
class COnscreenTimerEntry
{
public:
|