1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-10 20:39:15 +00:00
re3/src/vehicles/CarGen.h

52 lines
1.4 KiB
C
Raw Normal View History

2019-07-27 18:28:18 +00:00
#pragma once
#include "common.h"
#include "config.h"
enum {
CARGEN_MAXACTUALLIMIT = 100
};
class CCarGenerator
{
int32 m_nModelIndex;
CVector m_vecPos;
float m_fAngle;
int16 m_nColor1;
int16 m_nColor2;
uint8 m_bForceSpawn;
uint8 m_nAlarm;
uint8 m_nDoorlock;
int16 m_nMinDelay;
int16 m_nMaxDelay;
uint32 m_nTimer;
int32 m_nVehicleHandle;
uint16 m_nUsesRemaining;
bool m_bIsBlocking;
public:
void SwitchOff();
void SwitchOn();
uint32 CalcNextGen();
void DoInternalProcessing();
void Process();
void Setup(float x, float y, float z, float angle, int32 mi, int16 color1, int16 color2, uint8 force, uint8 alarm, uint8 lock, uint16 min_delay, uint16 max_delay);
2020-05-11 22:59:35 +00:00
bool CheckForBlockage(int32 mi);
2020-07-05 20:45:09 +00:00
bool CheckIfWithinRangeOfAnyPlayers();
2019-07-27 18:28:18 +00:00
void SetUsesRemaining(uint16 uses) { m_nUsesRemaining = uses; }
};
class CTheCarGenerators
{
public:
static uint8 ProcessCounter;
static uint32 NumOfCarGenerators;
static CCarGenerator CarGeneratorArray[NUM_CARGENS];
static uint8 GenerateEvenIfPlayerIsCloseCounter;
static uint32 CurrentActiveCount;
2019-07-27 18:28:18 +00:00
static void Process();
static int32 CreateCarGenerator(float x, float y, float z, float angle, int32 mi, int16 color1, int16 color2, uint8 force, uint8 alarm, uint8 lock, uint16 min_delay, uint16 max_delay);
static void Init();
static void SaveAllCarGenerators(uint8 *, uint32 *);
static void LoadAllCarGenerators(uint8 *, uint32);
};