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

102 lines
2.3 KiB
C
Raw Normal View History

2019-05-31 09:44:43 +00:00
#pragma once
#include "Vehicle.h"
2019-08-03 22:31:00 +00:00
class CObject;
enum eHeliNodes
{
HELI_CHASSIS = 1,
HELI_TOPROTOR,
HELI_BACKROTOR,
HELI_TAIL,
HELI_TOPKNOT,
HELI_SKID_LEFT,
HELI_SKID_RIGHT,
NUM_HELI_NODES
};
enum
{
HELI_RANDOM0,
HELI_RANDOM1,
HELI_SCRIPT,
2020-07-26 21:41:01 +00:00
HELI_CATALINA, // TODO 2 in VC
2019-08-03 22:31:00 +00:00
NUM_HELIS
};
enum
{
HELI_TYPE_RANDOM,
HELI_TYPE_SCRIPT,
HELI_TYPE_CATALINA,
};
2019-05-31 09:44:43 +00:00
class CHeli : public CVehicle
{
public:
2019-08-03 22:31:00 +00:00
RwFrame *m_aHeliNodes[NUM_HELI_NODES];
int8 m_heliStatus;
float m_fSearchLightX;
float m_fSearchLightY;
uint32 m_nExplosionTimer;
float m_fRotation;
float m_fAngularSpeed;
float m_fTargetZ;
float m_fSearchLightIntensity;
int8 m_nHeliId;
int8 m_heliType;
int8 m_pathState;
2020-07-26 21:41:01 +00:00
int8 m_numSwat;
uint8 m_aSwatState[4];
2019-08-03 22:31:00 +00:00
float m_aSearchLightHistoryX[6];
float m_aSearchLightHistoryY[6];
uint32 m_nSearchLightTimer;
uint32 m_nShootTimer;
uint32 m_nLastShotTime;
uint32 m_nBulletDamage;
float m_fRotorRotation;
float m_fHeliDustZ[8];
uint32 m_nPoliceShoutTimer;
float m_fTargetOffset;
bool m_bTestRight;
2020-04-16 12:30:47 +00:00
static CHeli *pHelis[NUM_HELIS];
static int16 NumRandomHelis;
static uint32 TestForNewRandomHelisTimer;
static bool CatalinaHeliOn;
static bool CatalinaHasBeenShotDown;
static bool ScriptHeliOn;
2019-05-31 09:44:43 +00:00
2019-08-03 22:31:00 +00:00
CHeli(int32 id, uint8 CreatedBy);
2019-08-03 22:31:00 +00:00
// from CEntity
void SetModelIndex(uint32 id);
void ProcessControl(void);
void PreRender(void);
void Render(void);
void PreRenderAlways(void);
CObject *SpawnFlyingComponent(int32 component);
2020-07-26 21:41:01 +00:00
CVector FindSwatPositionRelativeToHeli(int n);
bool SendDownSwat(void);
2019-08-03 22:31:00 +00:00
static void InitHelis(void);
static CHeli *GenerateHeli(bool catalina); // out of class in III PC and later because of SecuROM
2019-08-03 22:31:00 +00:00
static void UpdateHelis(void);
2019-05-31 09:44:43 +00:00
static void SpecialHeliPreRender(void);
2019-08-03 22:31:00 +00:00
static bool TestRocketCollision(CVector *coors);
static bool TestBulletCollision(CVector *line0, CVector *line1, CVector *bulletPos, int32 damage);
2020-07-26 21:41:01 +00:00
static bool TestSniperCollision(CVector *line0, CVector *line1);
2019-08-03 22:31:00 +00:00
static void StartCatalinaFlyBy(void); // out of class in III PC and later because of SecuROM
2019-08-03 22:31:00 +00:00
static void RemoveCatalinaHeli(void);
static CHeli *FindPointerToCatalinasHeli(void);
static void CatalinaTakeOff(void);
static void MakeCatalinaHeliFlyAway(void);
static bool HasCatalinaBeenShotDown(void);
static void ActivateHeli(bool activate);
2019-05-31 09:44:43 +00:00
};