1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 20:20:02 +00:00
re3/src/vehicles/Plane.h

72 lines
1.6 KiB
C
Raw Normal View History

2019-06-02 15:13:56 +00:00
#pragma once
#include "Vehicle.h"
2020-05-11 07:18:41 +00:00
enum ePlaneNodes
{
PLANE_WHEEL_FRONT = 2,
PLANE_WHEEL_READ,
NUM_PLANE_NODES
};
2019-07-31 21:57:18 +00:00
struct CPlaneNode
{
CVector p; // position
float t; // xy-distance from start on path
bool bOnGround; // i.e. not flying
};
struct CPlaneInterpolationLine
{
uint8 type;
float time; // when does this keyframe start
// initial values at start of frame
float position;
float speed;
float acceleration;
};
2019-06-02 15:13:56 +00:00
class CPlane : public CVehicle
{
public:
// 0x288
2019-07-31 21:57:18 +00:00
int16 m_nPlaneId;
int16 m_isFarAway;
int16 m_nCurPathNode;
float m_fSpeed;
uint32 m_nFrameWhenHit;
bool m_bHasBeenHit;
bool m_bIsDrugRunCesna;
bool m_bIsDropOffCesna;
CPlane(int32 id, uint8 CreatedBy);
~CPlane(void);
2019-07-31 21:57:18 +00:00
// from CEntity
void SetModelIndex(uint32 id);
void DeleteRwObject(void);
void ProcessControl(void);
void PreRender(void);
void Render(void);
void FlagToDestroyWhenNextProcessed() { bRemoveFromWorld = true; }
2019-07-31 21:57:18 +00:00
static void InitPlanes(void);
static void Shutdown(void);
static CPlaneNode *LoadPath(char const *filename, int32 &numNodes, float &totalLength, bool loop);
static void UpdatePlanes(void);
static bool TestRocketCollision(CVector *rocketPos);
static void CreateIncomingCesna(void);
static void CreateDropOffCesna(void);
2020-01-23 15:43:19 +00:00
static const CVector FindDrugPlaneCoordinates(void);
static const CVector FindDropOffCesnaCoordinates(void);
2019-07-31 21:57:18 +00:00
static bool HasCesnaLanded(void);
static bool HasCesnaBeenDestroyed(void);
static bool HasDropOffCesnaBeenShotDown(void);
2019-06-02 15:13:56 +00:00
};
2020-05-10 13:54:37 +00:00
VALIDATE_SIZE(CPlane, 0x29C);
2019-07-31 21:57:18 +00:00
2020-04-16 12:30:47 +00:00
extern float LandingPoint;
extern float TakeOffPoint;
extern float PlanePathPosition[3];