2019-05-19 19:28:10 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-06-24 22:42:23 +00:00
|
|
|
#include "DamageManager.h"
|
2019-05-19 19:28:10 +00:00
|
|
|
#include "Vehicle.h"
|
|
|
|
|
2019-07-06 17:44:00 +00:00
|
|
|
struct CDoor
|
|
|
|
{
|
|
|
|
float m_fAngleWhenOpened;
|
|
|
|
float m_fAngleWhenClosed;
|
|
|
|
char field_8;
|
|
|
|
char field_9;
|
|
|
|
char field_10;
|
|
|
|
char field_11;
|
|
|
|
float m_fAngle;
|
|
|
|
float m_fPreviousAngle;
|
|
|
|
float m_fAngularVelocity;
|
|
|
|
CVector m_vecVelocity;
|
|
|
|
};
|
|
|
|
|
2019-05-19 19:28:10 +00:00
|
|
|
class CAutomobile : public CVehicle
|
|
|
|
{
|
|
|
|
public:
|
2019-06-02 15:13:56 +00:00
|
|
|
// 0x288
|
2019-07-06 17:44:00 +00:00
|
|
|
CDamageManager Damage;
|
|
|
|
CDoor Doors[6];
|
|
|
|
RwFrame *m_aCarNodes[NUM_CAR_NODES];
|
|
|
|
CColPoint m_aWheelColPoints[4];
|
|
|
|
float m_aWheelDist[4];
|
|
|
|
float m_aWheelDist_2[4];
|
|
|
|
float m_aWheelSkidThing[4];
|
|
|
|
int field_49C;
|
|
|
|
bool m_aWheelSkidmarkMuddy[4];
|
|
|
|
bool m_aWheelSkidmarkBloody[4];
|
|
|
|
float m_aWheelRotation[4];
|
|
|
|
float m_aWheelPosition[4];
|
|
|
|
float m_aWheelSpeed[4];
|
|
|
|
uint8 stuff3[12];
|
|
|
|
uint32 m_nBusDoorTimerEnd;
|
|
|
|
uint32 m_nBusDoorTimerStart;
|
|
|
|
float m_aSuspensionRange[4];
|
|
|
|
float m_aSuspensionLineLength[4];
|
|
|
|
float m_fHeightAboveRoad;
|
|
|
|
float m_fImprovedHandling;
|
|
|
|
uint8 stuff6[32];
|
|
|
|
CPhysical *m_aGroundPhysical[4]; // physicals touching wheels
|
|
|
|
CVector m_aGroundOffset[4]; // from ground object to colpoint
|
|
|
|
CEntity *m_pBlowUpEntity;
|
|
|
|
float m_weaponThingA; // TODO
|
|
|
|
float m_weaponThingB; // TODO
|
2019-06-24 22:42:23 +00:00
|
|
|
float m_fCarGunLR;
|
2019-07-06 17:44:00 +00:00
|
|
|
float m_fCarGunUD;
|
|
|
|
float m_fWindScreenRotation;
|
|
|
|
uint8 stuff4[4];
|
|
|
|
uint8 m_nWheelsOnGround_2;
|
|
|
|
uint8 m_nWheelsOnGround;
|
|
|
|
uint8 m_nWheelsOnGroundPrev;
|
|
|
|
uint8 stuff5[5];
|
|
|
|
int32 m_aWheelState[4];
|
2019-06-24 22:42:23 +00:00
|
|
|
|
2019-06-30 10:59:55 +00:00
|
|
|
CAutomobile(int, uint8);
|
|
|
|
CAutomobile* ctor(int, uint8);
|
2019-06-24 22:42:23 +00:00
|
|
|
void SetDoorDamage(int32, uint32, bool); /* TODO: eDoors */
|
2019-06-30 21:15:34 +00:00
|
|
|
void SetPanelDamage(int32, uint32, bool); /* TODO: ePanels */
|
|
|
|
void SetBumperDamage(int32, uint32, bool); /* TODO: ePanels */
|
2019-06-30 10:59:55 +00:00
|
|
|
void dtor() { this->CAutomobile::~CAutomobile(); }
|
2019-05-19 19:28:10 +00:00
|
|
|
};
|
|
|
|
static_assert(sizeof(CAutomobile) == 0x5A8, "CAutomobile: error");
|
2019-07-06 17:44:00 +00:00
|
|
|
static_assert(offsetof(CAutomobile, m_aWheelDist) == 0x46C, "CAutomobile: error");
|