summaryrefslogtreecommitdiffstats
path: root/src/control/CarCtrl.h
diff options
context:
space:
mode:
authorMichael <60937741+majesticCoding@users.noreply.github.com>2021-01-09 16:36:44 +0100
committerGitHub <noreply@github.com>2021-01-09 16:36:44 +0100
commit5a5f06ef2a40ba52cca60071cb95687fc8a0b1c3 (patch)
tree672024c0e3bf8cc3e0b96a89d6bed0680ab5284c /src/control/CarCtrl.h
parentAllocator fix (diff)
parentMerge remote-tracking branch 'upstream/lcs' into lcs (diff)
downloadre3-5a5f06ef2a40ba52cca60071cb95687fc8a0b1c3.tar
re3-5a5f06ef2a40ba52cca60071cb95687fc8a0b1c3.tar.gz
re3-5a5f06ef2a40ba52cca60071cb95687fc8a0b1c3.tar.bz2
re3-5a5f06ef2a40ba52cca60071cb95687fc8a0b1c3.tar.lz
re3-5a5f06ef2a40ba52cca60071cb95687fc8a0b1c3.tar.xz
re3-5a5f06ef2a40ba52cca60071cb95687fc8a0b1c3.tar.zst
re3-5a5f06ef2a40ba52cca60071cb95687fc8a0b1c3.zip
Diffstat (limited to 'src/control/CarCtrl.h')
-rw-r--r--src/control/CarCtrl.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/control/CarCtrl.h b/src/control/CarCtrl.h
index 5efbe275..fcb7929b 100644
--- a/src/control/CarCtrl.h
+++ b/src/control/CarCtrl.h
@@ -1,6 +1,7 @@
#pragma once
#include "PathFind.h"
#include "Boat.h"
+#include "General.h"
#include "Vehicle.h"
#define GAME_SPEED_TO_METERS_PER_SECOND 50.0f
@@ -130,6 +131,10 @@ public:
static void SteerAIBoatWithPhysicsAttackingPlayer(CVehicle*, float*, float*, float*, bool*);
static void SteerAICarBlockingPlayerForwardAndBack(CVehicle*, float*, float*, float*, bool*);
+ static bool OkToCreateVehicleAtThisPosition(const CVector&);
+ static void RenderDebugInfo(CVehicle*);
+ static float GetATanOfXY(float x, float y) { float t = CGeneral::GetATanOfXY(x, y); if (t < 0.0f) t += TWOPI; return t; }
+
static float GetPositionAlongCurrentCurve(CVehicle* pVehicle)
{
uint32 timeInCurve = CTimer::GetTimeInMilliseconds() - pVehicle->AutoPilot.m_nTimeEnteredCurve;
@@ -138,11 +143,7 @@ public:
static float LimitRadianAngle(float angle)
{
- while (angle < -PI)
- angle += TWOPI;
- while (angle > PI)
- angle -= TWOPI;
- return angle;
+ return CGeneral::LimitRadianAngle(angle);
}
static bool bMadDriversCheat;