diff options
author | bigbossbro08 <bigbossbro08@gmail.com> | 2020-05-10 15:54:37 +0200 |
---|---|---|
committer | bigbossbro08 <bigbossbro08@gmail.com> | 2020-05-10 15:54:37 +0200 |
commit | af6e132b37e8b7e89e4c0c7a52e5bb81e4b1b9a8 (patch) | |
tree | 76d91c02ec3701babef050228de8a40fe2306dcd /src/vehicles | |
parent | Small unification (diff) | |
download | re3-af6e132b37e8b7e89e4c0c7a52e5bb81e4b1b9a8.tar re3-af6e132b37e8b7e89e4c0c7a52e5bb81e4b1b9a8.tar.gz re3-af6e132b37e8b7e89e4c0c7a52e5bb81e4b1b9a8.tar.bz2 re3-af6e132b37e8b7e89e4c0c7a52e5bb81e4b1b9a8.tar.lz re3-af6e132b37e8b7e89e4c0c7a52e5bb81e4b1b9a8.tar.xz re3-af6e132b37e8b7e89e4c0c7a52e5bb81e4b1b9a8.tar.zst re3-af6e132b37e8b7e89e4c0c7a52e5bb81e4b1b9a8.zip |
Diffstat (limited to 'src/vehicles')
-rw-r--r-- | src/vehicles/Automobile.h | 2 | ||||
-rw-r--r-- | src/vehicles/Boat.h | 2 | ||||
-rw-r--r-- | src/vehicles/Cranes.h | 2 | ||||
-rw-r--r-- | src/vehicles/Heli.h | 3 | ||||
-rw-r--r-- | src/vehicles/Plane.h | 3 | ||||
-rw-r--r-- | src/vehicles/Train.h | 3 | ||||
-rw-r--r-- | src/vehicles/Vehicle.h | 2 |
7 files changed, 17 insertions, 0 deletions
diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h index 041302bf..16d1a2ef 100644 --- a/src/vehicles/Automobile.h +++ b/src/vehicles/Automobile.h @@ -197,7 +197,9 @@ public: static void SetAllTaxiLights(bool set); }; +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CAutomobile) == 0x5A8, "CAutomobile: error"); +#endif inline uint8 GetCarDoorFlag(int32 carnode) { switch (carnode) { diff --git a/src/vehicles/Boat.h b/src/vehicles/Boat.h index 70407ab9..014b1e48 100644 --- a/src/vehicles/Boat.h +++ b/src/vehicles/Boat.h @@ -72,7 +72,9 @@ public: }; +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CBoat) == 0x484, "CBoat: error"); +#endif extern float MAX_WAKE_LENGTH; extern float MIN_WAKE_INTERVAL; diff --git a/src/vehicles/Cranes.h b/src/vehicles/Cranes.h index c0502638..4d4c8fb4 100644 --- a/src/vehicles/Cranes.h +++ b/src/vehicles/Cranes.h @@ -72,7 +72,9 @@ public: float GetHeightToDropoffHeight() { return m_fDropoffHeight + (m_bIsCrusher ? 7.0f : 2.0f); } }; +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CCrane) == 128, "CCrane: error"); +#endif class CCranes { diff --git a/src/vehicles/Heli.h b/src/vehicles/Heli.h index 39e4cbcf..d41afb58 100644 --- a/src/vehicles/Heli.h +++ b/src/vehicles/Heli.h @@ -95,4 +95,7 @@ public: static void ActivateHeli(bool activate); }; + +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CHeli) == 0x33C, "CHeli: error"); +#endif diff --git a/src/vehicles/Plane.h b/src/vehicles/Plane.h index 79738858..f0c5902b 100644 --- a/src/vehicles/Plane.h +++ b/src/vehicles/Plane.h @@ -63,7 +63,10 @@ public: static bool HasCesnaBeenDestroyed(void); static bool HasDropOffCesnaBeenShotDown(void); }; + +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CPlane) == 0x29C, "CPlane: error"); +#endif extern float LandingPoint; extern float TakeOffPoint; diff --git a/src/vehicles/Train.h b/src/vehicles/Train.h index bf541250..6fb73169 100644 --- a/src/vehicles/Train.h +++ b/src/vehicles/Train.h @@ -91,4 +91,7 @@ public: float *totalLength, float *totalDuration, CTrainInterpolationLine *interpLines, bool rightRail); static void UpdateTrains(void); }; + +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CTrain) == 0x2E4, "CTrain: error"); +#endif
\ No newline at end of file diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index 110ff97c..d8891628 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -291,9 +291,11 @@ public: static bool m_bDisableMouseSteering; }; +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CVehicle) == 0x288, "CVehicle: error"); static_assert(offsetof(CVehicle, m_pCurGroundEntity) == 0x1E0, "CVehicle: error"); static_assert(offsetof(CVehicle, m_nAlarmState) == 0x1A0, "CVehicle: error"); static_assert(offsetof(CVehicle, m_nLastWeaponDamage) == 0x228, "CVehicle: error"); +#endif void DestroyVehicleAndDriverAndPassengers(CVehicle* pVehicle); |