From af6e132b37e8b7e89e4c0c7a52e5bb81e4b1b9a8 Mon Sep 17 00:00:00 2001 From: bigbossbro08 Date: Sun, 10 May 2020 19:54:37 +0600 Subject: defined out asserts. --- src/control/AutoPilot.h | 5 ++++- src/control/Garages.h | 2 ++ src/control/PathFind.h | 7 +++++++ src/control/Phones.h | 2 ++ src/control/Pickups.h | 2 ++ src/control/Replay.h | 3 +++ 6 files changed, 20 insertions(+), 1 deletion(-) (limited to 'src/control') diff --git a/src/control/AutoPilot.h b/src/control/AutoPilot.h index 345f4cb4..1528db46 100644 --- a/src/control/AutoPilot.h +++ b/src/control/AutoPilot.h @@ -119,4 +119,7 @@ public: #endif }; -static_assert(sizeof(CAutoPilot) == 0x70, "CAutoPilot: error"); \ No newline at end of file + +#ifdef CHECK_STRUCT_SIZES +static_assert(sizeof(CAutoPilot) == 0x70, "CAutoPilot: error"); +#endif \ No newline at end of file diff --git a/src/control/Garages.h b/src/control/Garages.h index 3105f72d..95e7ba5c 100644 --- a/src/control/Garages.h +++ b/src/control/Garages.h @@ -172,7 +172,9 @@ class CGarage friend class CCamera; }; +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CGarage) == 140, "CGarage"); +#endif class CGarages { diff --git a/src/control/PathFind.h b/src/control/PathFind.h index 8049ea52..d812ac32 100644 --- a/src/control/PathFind.h +++ b/src/control/PathFind.h @@ -41,7 +41,10 @@ struct CPedPathNode CPedPathNode* prev; CPedPathNode* next; }; + +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CPedPathNode) == 0x10, "CPedPathNode: error"); +#endif class CPedPath { public: @@ -221,7 +224,11 @@ public: void DisplayPathData(void); }; + + +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CPathFind) == 0x49bf4, "CPathFind: error"); +#endif extern CPathFind ThePaths; diff --git a/src/control/Phones.h b/src/control/Phones.h index 7fbf403f..01ed370e 100644 --- a/src/control/Phones.h +++ b/src/control/Phones.h @@ -32,7 +32,9 @@ public: ~CPhone() { } }; +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CPhone) == 0x34, "CPhone: error"); +#endif class CPhoneInfo { public: diff --git a/src/control/Pickups.h b/src/control/Pickups.h index 11da5f54..f4e5e560 100644 --- a/src/control/Pickups.h +++ b/src/control/Pickups.h @@ -47,7 +47,9 @@ private: void Remove(); }; +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(CPickup) == 0x1C, "CPickup: error"); +#endif struct tPickupMessage { diff --git a/src/control/Replay.h b/src/control/Replay.h index bf70a28a..ec39def8 100644 --- a/src/control/Replay.h +++ b/src/control/Replay.h @@ -108,7 +108,10 @@ class CReplay CMatrix camera_pos; CVector player_pos; }; + +#ifdef CHECK_STRUCT_SIZES static_assert(sizeof(tGeneralPacket) == 88, "tGeneralPacket: error"); +#endif struct tClockPacket { -- cgit v1.2.3