diff options
Diffstat (limited to '')
-rw-r--r-- | src/vehicles/Vehicle.h | 53 |
1 files changed, 44 insertions, 9 deletions
diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index 39a56fe0..1e70d171 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -69,6 +69,33 @@ enum eDoors DOOR_REAR_RIGHT }; +enum ePanels +{ + VEHPANEL_FRONT_LEFT, + VEHPANEL_FRONT_RIGHT, + VEHPANEL_REAR_LEFT, + VEHPANEL_REAR_RIGHT, + VEHPANEL_WINDSCREEN, + VEHBUMPER_FRONT, + VEHBUMPER_REAR, +}; + +enum eLights +{ + VEHLIGHT_FRONT_LEFT, + VEHLIGHT_FRONT_RIGHT, + VEHLIGHT_REAR_LEFT, + VEHLIGHT_REAR_RIGHT, +}; + +enum +{ + CAR_PIECE_WHEEL_LF = 13, + CAR_PIECE_WHEEL_LR, + CAR_PIECE_WHEEL_RF, + CAR_PIECE_WHEEL_RR, +}; + class CVehicle : public CPhysical { public: @@ -115,7 +142,7 @@ public: uint8 m_veh_flagB80 : 1; uint8 m_veh_flagC1 : 1; - uint8 m_veh_flagC2 : 1; + uint8 m_veh_flagC2 : 1; // bIsDamaged uint8 m_veh_flagC4 : 1; uint8 m_veh_flagC8 : 1; uint8 m_veh_flagC10 : 1; @@ -169,7 +196,7 @@ public: ~CVehicle(void); // from CEntity - void SetModelIndex(uint32 i); + void SetModelIndex(uint32 id); bool SetupLighting(void); void RemoveLighting(bool); void FlagToDestroyWhenNextProcessed(void) {} @@ -225,16 +252,24 @@ public: static bool &bCheat4; static bool &bCheat5; static bool &m_bDisableMouseSteering; - - - void dtor(void) { CVehicle::~CVehicle(); } - void SetModelIndex_(uint32 id) { CVehicle::SetModelIndex(id); } - bool SetupLighting_(void) { return CVehicle::SetupLighting(); } - void RemoveLighting_(bool reset) { CVehicle::RemoveLighting(reset); } - float GetHeightAboveRoad_(void) { return CVehicle::GetHeightAboveRoad(); } }; static_assert(sizeof(CVehicle) == 0x288, "CVehicle: error"); static_assert(offsetof(CVehicle, m_pCurSurface) == 0x1E0, "CVehicle: error"); static_assert(offsetof(CVehicle, m_nAlarmState) == 0x1A0, "CVehicle: error"); static_assert(offsetof(CVehicle, m_nLastWeaponDamage) == 0x228, "CVehicle: error"); + +inline uint8 GetVehDoorFlag(int32 carnode) { + switch (carnode) { + case CAR_DOOR_LF: + return 1; + case CAR_DOOR_LR: + return 2; + case CAR_DOOR_RF: + return 4; + case CAR_DOOR_RR: + return 8; + default: + return 0; + } +} |