2019-06-02 15:13:56 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Vehicle.h"
|
2020-07-01 16:03:39 +00:00
|
|
|
#include "Door.h"
|
2019-06-02 15:13:56 +00:00
|
|
|
|
2020-04-12 22:02:11 +00:00
|
|
|
enum eBoatNodes
|
|
|
|
{
|
|
|
|
BOAT_MOVING = 1,
|
2020-05-10 18:51:29 +00:00
|
|
|
BOAT_WINDSCREEN,
|
2020-04-12 22:02:11 +00:00
|
|
|
BOAT_RUDDER,
|
2020-05-10 18:51:29 +00:00
|
|
|
BOAT_FLAP_LEFT,
|
|
|
|
BOAT_FLAP_RIGHT,
|
|
|
|
BOAT_REARFLAP_LEFT,
|
2020-07-01 16:03:39 +00:00
|
|
|
BOAT_REARFLAP_RIGHT,
|
|
|
|
NUM_BOAT_NODES
|
2020-04-12 22:02:11 +00:00
|
|
|
};
|
|
|
|
|
2019-06-02 15:13:56 +00:00
|
|
|
class CBoat : public CVehicle
|
|
|
|
{
|
|
|
|
public:
|
2020-07-01 16:03:39 +00:00
|
|
|
float m_fMovingRotation;
|
|
|
|
float m_fMovingSpeed;
|
|
|
|
int32 m_boat_unused1;
|
|
|
|
RwFrame *m_aBoatNodes[NUM_BOAT_NODES];
|
|
|
|
CDoor m_boom;
|
|
|
|
tBoatHandlingData *pBoatHandling;
|
2020-04-12 22:02:11 +00:00
|
|
|
uint8 bBoatInWater : 1;
|
|
|
|
uint8 bPropellerInWater : 1;
|
2019-06-29 20:15:55 +00:00
|
|
|
bool m_bIsAnchored;
|
2020-04-12 22:02:11 +00:00
|
|
|
float m_fOrientation;
|
2020-07-01 16:03:39 +00:00
|
|
|
uint32 m_nPoliceShoutTimer;
|
|
|
|
int32 m_boat_unused2;
|
2020-04-12 22:02:11 +00:00
|
|
|
float m_fDamage;
|
|
|
|
CEntity *m_pSetOnFireEntity;
|
2020-07-01 16:03:39 +00:00
|
|
|
float m_skimmerThingTimer;
|
|
|
|
bool m_boat_unused3;
|
2019-07-11 00:22:01 +00:00
|
|
|
float m_fAccelerate;
|
|
|
|
float m_fBrake;
|
|
|
|
float m_fSteeringLeftRight;
|
|
|
|
uint8 m_nPadID;
|
2020-07-01 16:03:39 +00:00
|
|
|
int32 m_boat_unused4;
|
2020-04-12 22:02:11 +00:00
|
|
|
float m_fVolumeUnderWater;
|
|
|
|
CVector m_vecBuoyancePoint;
|
|
|
|
float m_fPrevVolumeUnderWater;
|
|
|
|
int16 m_nDeltaVolumeUnderWater;
|
2019-07-11 00:22:01 +00:00
|
|
|
uint16 m_nNumWakePoints;
|
|
|
|
CVector2D m_avec2dWakePoints[32];
|
|
|
|
float m_afWakePointLifeTime[32];
|
2019-06-30 10:59:55 +00:00
|
|
|
|
2020-05-27 18:50:01 +00:00
|
|
|
static float MAX_WAKE_LENGTH;
|
|
|
|
static float MIN_WAKE_INTERVAL;
|
|
|
|
static float WAKE_LIFETIME;
|
|
|
|
|
2019-06-30 10:59:55 +00:00
|
|
|
CBoat(int, uint8);
|
2020-01-23 17:32:35 +00:00
|
|
|
|
|
|
|
virtual void SetModelIndex(uint32 id);
|
|
|
|
virtual void ProcessControl();
|
|
|
|
virtual void Teleport(CVector v);
|
2020-07-01 16:03:39 +00:00
|
|
|
virtual void PreRender(void);
|
2020-01-23 17:32:35 +00:00
|
|
|
virtual void Render(void);
|
|
|
|
virtual void ProcessControlInputs(uint8);
|
|
|
|
virtual void GetComponentWorldPosition(int32 component, CVector &pos);
|
|
|
|
virtual bool IsComponentPresent(int32 component) { return true; }
|
|
|
|
virtual void BlowUpCar(CEntity *ent);
|
2019-07-11 00:22:01 +00:00
|
|
|
|
2020-04-12 22:02:11 +00:00
|
|
|
void ApplyWaterResistance(void);
|
2020-01-23 17:32:35 +00:00
|
|
|
void SetupModelNodes();
|
2020-04-12 22:02:11 +00:00
|
|
|
void PruneWakeTrail(void);
|
|
|
|
void AddWakePoint(CVector point);
|
2020-05-17 17:36:48 +00:00
|
|
|
void DoDriveByShootings(void);
|
2020-01-23 17:32:35 +00:00
|
|
|
|
2020-04-16 12:30:47 +00:00
|
|
|
static CBoat *apFrameWakeGeneratingBoats[4];
|
2019-07-11 00:22:01 +00:00
|
|
|
|
|
|
|
static bool IsSectorAffectedByWake(CVector2D sector, float fSize, CBoat **apBoats);
|
|
|
|
static float IsVertexAffectedByWake(CVector vecVertex, CBoat *pBoat);
|
|
|
|
static void FillBoatList(void);
|
2019-07-11 00:48:36 +00:00
|
|
|
|
2020-05-02 15:02:17 +00:00
|
|
|
#ifdef COMPATIBLE_SAVES
|
|
|
|
virtual void Save(uint8*& buf);
|
|
|
|
virtual void Load(uint8*& buf);
|
|
|
|
#endif
|
|
|
|
static const uint32 nSaveStructSize;
|
|
|
|
|
2020-05-27 18:50:01 +00:00
|
|
|
};
|