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,
|
|
|
|
HELI_CATALINA,
|
|
|
|
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:
|
|
|
|
// 0x288
|
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;
|
|
|
|
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;
|
2019-08-03 22:31:00 +00:00
|
|
|
static int16 NumScriptHelis; // unused
|
2020-04-16 12:30:47 +00:00
|
|
|
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-06-30 10:59:55 +00:00
|
|
|
|
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);
|
|
|
|
|
|
|
|
static void InitHelis(void);
|
|
|
|
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);
|
|
|
|
|
|
|
|
static void StartCatalinaFlyBy(void);
|
|
|
|
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
|
|
|
};
|
|
|
|
static_assert(sizeof(CHeli) == 0x33C, "CHeli: error");
|