summaryrefslogtreecommitdiffstats
path: root/src/control/CarCtrl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/control/CarCtrl.h')
-rw-r--r--src/control/CarCtrl.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/src/control/CarCtrl.h b/src/control/CarCtrl.h
index 5efbe275..c6796504 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
@@ -16,6 +17,13 @@ enum{
MAX_CAR_MODELS_IN_ARRAY = 25,
};
+#ifdef GTA_NETWORK
+enum {
+ TOTAL_MULTIPLAYER_CAR_BANKS = 3,
+ CARS_IN_MULTIPLAYER_BANK = 8
+};
+#endif
+
#ifdef FIX_BUGS
#define FIX_PATHFIND_BUG
#endif
@@ -130,6 +138,13 @@ 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 void SetMultiplayerAmbientCarLimit(uint32);
+ static void ToggleScriptControlsMpCarLimit(bool);
+ static void MultiPlayerRemoveVehicleAndDriver(CVehicle*);
+ static void Write(base::cRelocatableChunkWriter&);
+
static float GetPositionAlongCurrentCurve(CVehicle* pVehicle)
{
uint32 timeInCurve = CTimer::GetTimeInMilliseconds() - pVehicle->AutoPilot.m_nTimeEnteredCurve;
@@ -138,11 +153,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;
@@ -169,6 +180,15 @@ public:
static int32 NumOfLoadedCarsOfRating[TOTAL_CUSTOM_CLASSES];
static int32 CarFreqArrays[TOTAL_CUSTOM_CLASSES][MAX_CAR_MODELS_IN_ARRAY];
static int32 LoadedCarsArray[TOTAL_CUSTOM_CLASSES][MAX_CAR_MODELS_IN_ARRAY];
+
+#ifdef GTA_NETWORK
+ static const int32 MultiplayerCarBanks[TOTAL_MULTIPLAYER_CAR_BANKS][CARS_IN_MULTIPLAYER_BANK];
+#endif
+
+ static uint32 maxRandomMpCars;
+ static bool scriptControlsMpCarLimit;
+
};
-extern CVehicle* apCarsToKeep[MAX_CARS_TO_KEEP]; \ No newline at end of file
+extern CVehicle* apCarsToKeep[MAX_CARS_TO_KEEP];
+extern bool gbEmergencyVehiclesEnabled; \ No newline at end of file