2019-06-02 17:13:56 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Vehicle.h"
|
|
|
|
|
2020-04-13 00:02:11 +02:00
|
|
|
enum eBoatNodes
|
|
|
|
{
|
|
|
|
BOAT_MOVING = 1,
|
|
|
|
BOAT_RUDDER,
|
|
|
|
BOAT_WINDSCREEN
|
|
|
|
};
|
|
|
|
|
2019-06-02 17:13:56 +02:00
|
|
|
class CBoat : public CVehicle
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// 0x288
|
2020-04-13 00:02:11 +02:00
|
|
|
float m_fPropellerZ;
|
|
|
|
float m_fPropellerY;
|
|
|
|
CVector m_waterMoveDrag;
|
|
|
|
CVector m_waterTurnDrag;
|
2019-07-11 02:22:01 +02:00
|
|
|
float m_fMovingHiRotation;
|
|
|
|
int32 _unk0;
|
|
|
|
RwFrame *m_aBoatNodes[4];
|
2020-04-13 00:02:11 +02:00
|
|
|
uint8 bBoatInWater : 1;
|
|
|
|
uint8 bPropellerInWater : 1;
|
2019-06-29 22:15:55 +02:00
|
|
|
bool m_bIsAnchored;
|
2020-04-13 00:02:11 +02:00
|
|
|
float m_fOrientation;
|
2019-07-11 02:22:01 +02:00
|
|
|
int32 _unk1;
|
2020-04-13 00:02:11 +02:00
|
|
|
float m_fDamage;
|
|
|
|
CEntity *m_pSetOnFireEntity;
|
2019-07-11 02:22:01 +02:00
|
|
|
bool _unk2;
|
|
|
|
float m_fAccelerate;
|
|
|
|
float m_fBrake;
|
|
|
|
float m_fSteeringLeftRight;
|
|
|
|
uint8 m_nPadID;
|
|
|
|
int32 _unk3;
|
2020-04-13 00:02:11 +02:00
|
|
|
float m_fVolumeUnderWater;
|
|
|
|
CVector m_vecBuoyancePoint;
|
|
|
|
float m_fPrevVolumeUnderWater;
|
|
|
|
int16 m_nDeltaVolumeUnderWater;
|
2019-07-11 02:22:01 +02:00
|
|
|
uint16 m_nNumWakePoints;
|
|
|
|
CVector2D m_avec2dWakePoints[32];
|
|
|
|
float m_afWakePointLifeTime[32];
|
2019-06-30 12:59:55 +02:00
|
|
|
|
|
|
|
CBoat(int, uint8);
|
2020-01-23 18:32:35 +01:00
|
|
|
|
|
|
|
virtual void SetModelIndex(uint32 id);
|
|
|
|
virtual void ProcessControl();
|
|
|
|
virtual void Teleport(CVector v);
|
|
|
|
virtual void PreRender(void) {};
|
|
|
|
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 02:22:01 +02:00
|
|
|
|
2020-04-13 00:02:11 +02:00
|
|
|
void ApplyWaterResistance(void);
|
2020-01-23 18:32:35 +01:00
|
|
|
void SetupModelNodes();
|
2020-04-13 00:02:11 +02:00
|
|
|
void PruneWakeTrail(void);
|
|
|
|
void AddWakePoint(CVector point);
|
2020-01-23 18:32:35 +01:00
|
|
|
|
2019-07-11 02:22:01 +02:00
|
|
|
static CBoat *(&apFrameWakeGeneratingBoats)[4];
|
|
|
|
|
|
|
|
static bool IsSectorAffectedByWake(CVector2D sector, float fSize, CBoat **apBoats);
|
|
|
|
static float IsVertexAffectedByWake(CVector vecVertex, CBoat *pBoat);
|
|
|
|
static void FillBoatList(void);
|
2019-07-11 02:48:36 +02:00
|
|
|
|
2019-06-02 17:13:56 +02:00
|
|
|
};
|
|
|
|
static_assert(sizeof(CBoat) == 0x484, "CBoat: error");
|
2019-07-11 02:22:01 +02:00
|
|
|
|
|
|
|
extern float MAX_WAKE_LENGTH;
|
|
|
|
extern float MIN_WAKE_INTERVAL;
|
|
|
|
extern float WAKE_LIFETIME;
|