2017-09-28 02:12:05 +05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
2019-12-12 02:54:27 +05:00
|
|
|
#include "Maths.h"
|
2024-05-09 22:11:20 +05:00
|
|
|
#include "TheFLAUtils.h"
|
2017-09-28 02:12:05 +05:00
|
|
|
|
|
|
|
enum eVehicleType
|
|
|
|
{
|
|
|
|
VEHICLE_AUTOMOBILE,
|
|
|
|
VEHICLE_BOAT,
|
|
|
|
VEHICLE_TRAIN,
|
|
|
|
VEHICLE_HELI,
|
|
|
|
VEHICLE_PLANE
|
|
|
|
};
|
|
|
|
|
|
|
|
class CVehicle
|
|
|
|
{
|
2019-12-12 02:54:27 +05:00
|
|
|
protected:
|
|
|
|
// TODO: Make this part of CEntity properly
|
|
|
|
void* __vmt;
|
|
|
|
CMatrix m_matrix;
|
|
|
|
uint8_t __pad2[16];
|
2024-05-09 22:11:20 +05:00
|
|
|
FLAUtils::int16 m_modelIndex;
|
2019-12-12 02:54:27 +05:00
|
|
|
uint8_t __pad1[548];
|
2017-09-28 02:12:05 +05:00
|
|
|
uint32_t m_dwVehicleClass;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
2019-12-12 02:54:27 +05:00
|
|
|
int32_t GetModelIndex() const
|
2024-05-09 22:11:20 +05:00
|
|
|
{ return m_modelIndex.Get(); }
|
2019-12-12 02:54:27 +05:00
|
|
|
|
|
|
|
const CMatrix& GetMatrix() const
|
|
|
|
{ return m_matrix; }
|
|
|
|
|
2017-09-28 02:12:05 +05:00
|
|
|
uint32_t GetClass() const
|
|
|
|
{ return m_dwVehicleClass; }
|
|
|
|
};
|
|
|
|
|
|
|
|
class CAutomobile : public CVehicle
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
uint8_t __pad2[593];
|
|
|
|
uint8_t m_BombOnBoard : 3;
|
|
|
|
class CEntity* m_pBombOwner;
|
|
|
|
uint8_t __pad33[200];
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
void SetBombOnBoard( uint32_t bombOnBoard )
|
|
|
|
{ m_BombOnBoard = bombOnBoard; }
|
|
|
|
void SetBombOwner( class CEntity* owner )
|
|
|
|
{ m_pBombOwner = owner; }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static_assert(sizeof(CVehicle) == 0x288, "Wrong size: CVehicle");
|
|
|
|
static_assert(sizeof(CAutomobile) == 0x5A8, "Wrong size: CAutomobile");
|