diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-06-24 16:57:54 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-06-24 23:01:40 +0200 |
commit | 1e09bf9c30094b4387431be4842876181a1425fe (patch) | |
tree | 22ee6dfa941b6cc85619973311c357f11acc1ef1 /src/entities/Vehicle.h | |
parent | more Radar code (diff) | |
download | re3-1e09bf9c30094b4387431be4842876181a1425fe.tar re3-1e09bf9c30094b4387431be4842876181a1425fe.tar.gz re3-1e09bf9c30094b4387431be4842876181a1425fe.tar.bz2 re3-1e09bf9c30094b4387431be4842876181a1425fe.tar.lz re3-1e09bf9c30094b4387431be4842876181a1425fe.tar.xz re3-1e09bf9c30094b4387431be4842876181a1425fe.tar.zst re3-1e09bf9c30094b4387431be4842876181a1425fe.zip |
Diffstat (limited to 'src/entities/Vehicle.h')
-rw-r--r-- | src/entities/Vehicle.h | 88 |
1 files changed, 75 insertions, 13 deletions
diff --git a/src/entities/Vehicle.h b/src/entities/Vehicle.h index e5d1cfb3..f11e9e97 100644 --- a/src/entities/Vehicle.h +++ b/src/entities/Vehicle.h @@ -3,23 +3,53 @@ #include "Physical.h" class CPed; +class CFire; +struct tHandlingData; + +enum { + GETTING_IN_OUT_FL = 1, + GETTING_IN_OUT_RL = 2, + GETTING_IN_OUT_FR = 4, + GETTING_IN_OUT_RR = 8 +}; + +enum eCarLock : uint8 { + CARLOCK_NOT_USED, + CARLOCK_UNLOCKED, + CARLOCK_LOCKED, + CARLOCK_LOCKOUT_PLAYER_ONLY, + CARLOCK_LOCKED_PLAYER_INSIDE, + CARLOCK_COP_CAR, + CARLOCK_FORCE_SHUT_DOORS, + CARLOCK_SKIP_SHUT_DOORS +}; class CVehicle : public CPhysical { public: // 0x128 - uint8 stuff1[116]; + tHandlingData *m_handling; + uint8 stuff1[112]; uint8 m_currentColour1; uint8 m_currentColour2; -uint8 m_extra1; -uint8 m_extra2; - int16 m_nAlarmState; + uint8 m_anExtras[2]; + int16 m_nAlarmState; // m_nWantedStarsOnEnter on DK22 + int16 m_nMissionValue; CPed *pDriver; CPed *pPassengers[8]; - uint8 stuff2[24]; + uint8 m_nNumPassengers; + int8 m_nNumGettingIn; + int8 m_nGettingInFlags; + int8 m_nGettingOutFlags; + uint8 m_nNumMaxPassengers; + char field_1CD[19]; CEntity *m_pCurSurface; - uint8 stuff3[17]; - uint8 m_veh_flagA1 : 1; + CFire *m_pCarFire; + float m_fSteerAngle; + float m_fGasPedal; + float m_fBreakPedal; + uint8 m_nCreatedBy; // eVehicleCreatedBy + uint8 bIsLawEnforcer : 1; uint8 m_veh_flagA2 : 1; uint8 m_veh_flagA4 : 1; uint8 m_veh_flagA8 : 1; @@ -27,10 +57,10 @@ uint8 m_extra2; uint8 m_veh_flagA20 : 1; uint8 m_veh_flagA40 : 1; uint8 m_veh_flagA80 : 1; - uint8 m_veh_flagB1 : 1; - uint8 m_veh_flagB2 : 1; - uint8 m_veh_flagB4 : 1; - uint8 m_veh_flagB8 : 1; + uint8 bIsVan : 1; + uint8 bIsBus : 1; + uint8 bIsBig : 1; + uint8 bIsLow : 1; uint8 m_veh_flagB10 : 1; uint8 m_veh_flagB20 : 1; uint8 m_veh_flagB40 : 1; @@ -51,8 +81,34 @@ uint8 m_extra2; uint8 m_veh_flagD20 : 1; uint8 m_veh_flagD40 : 1; uint8 m_veh_flagD80 : 1; - uint8 stuff4[139]; - int32 m_vehType; + int8 field_1F9; + uint8 m_nAmmoInClip[1]; // Used to make the guns on boat do a reload (20 by default) + int8 field_1FB; + int8 field_1FC[4]; + float m_fHealth; // 1000.0f = full health. 0 -> explode + uint8 m_nCurrentGear; + int8 field_205[3]; + int field_208; + uint32 m_nGunFiringTime; // last time when gun on vehicle was fired (used on boats) + uint32 m_nTimeOfDeath; + int16 field_214; + int16 m_nBombTimer; // goes down with each frame + CPed *m_pWhoDetonatedMe; + float field_21C; + float field_220; + eCarLock m_nDoorLock; + int8 m_nLastWeaponDamage; // see eWeaponType, -1 if no damage + int8 m_nRadioStation; + int8 field_22A; + int8 field_22B; + uint8 m_nCarHornTimer; + int8 field_22D; + uint8 m_nSirenOrAlarm; + int8 field_22F; + CStoredCollPoly m_frontCollPoly; // poly which is under front part of car + CStoredCollPoly m_rearCollPoly; // poly which is under rear part of car + float m_fSteerRatio; + eVehicleType m_vehType; static void *operator new(size_t); static void operator delete(void*, size_t); @@ -62,6 +118,10 @@ uint8 m_extra2; bool IsTrain(void) { return m_vehType == VEHICLE_TYPE_TRAIN; } bool IsHeli(void) { return m_vehType == VEHICLE_TYPE_HELI; } bool IsPlane(void) { return m_vehType == VEHICLE_TYPE_PLANE; } + bool IsLawEnforcementVehicle(void); + void ChangeLawEnforcerState(bool enable); + void RemoveDriver(void); + bool IsUpsideDown(void); static bool &bWheelsOnlyCheat; static bool &bAllDodosCheat; @@ -69,5 +129,7 @@ uint8 m_extra2; static bool &bCheat4; static bool &bCheat5; }; + 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"); |