From 8ae86de0b32bd68ad5d7d43ca7ba3fce9bb3e848 Mon Sep 17 00:00:00 2001 From: FutureRave Date: Sat, 22 Jan 2022 13:00:44 +0000 Subject: [PATCH 1/3] [Structs] Fix gentity_s fields type --- src/Game/Structs.hpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index 13995f34..1019ae63 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -5501,14 +5501,14 @@ namespace Game void /*Vehicle*/* vehicle; int physObjId; unsigned __int16 model; - char physicsObject; - char takedamage; - char active; - char handler; - char team; + unsigned char physicsObject; + unsigned char takedamage; + unsigned char active; + unsigned char handler; + unsigned char team; bool freeAfterEvent; __int16 padding_short; - short classname; + unsigned __int16 classname; unsigned __int16 script_classname; unsigned __int16 script_linkName; unsigned __int16 target; @@ -5537,6 +5537,9 @@ namespace Game } gentity_t; #pragma pack(push, 1) + + static_assert(sizeof(gentity_s) == 0x274); + typedef struct client_s { clientstate_t state; // 0 From 347bd616ee1c277f2df9bbf1ab5a3d89ddd3789b Mon Sep 17 00:00:00 2001 From: Edo Date: Sat, 22 Jan 2022 13:39:29 +0000 Subject: [PATCH 2/3] Update Structs.hpp --- src/Game/Structs.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index 1019ae63..ed12b603 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -5536,10 +5536,10 @@ namespace Game char pad[100]; } gentity_t; -#pragma pack(push, 1) - static_assert(sizeof(gentity_s) == 0x274); +#pragma pack(push, 1) + typedef struct client_s { clientstate_t state; // 0 From 57f612c793494c4c801981789388cf7df023c7bd Mon Sep 17 00:00:00 2001 From: Edo Date: Sat, 22 Jan 2022 15:54:32 +0000 Subject: [PATCH 3/3] Forgot this newline --- src/Game/Structs.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index ed12b603..0d55a280 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -5578,6 +5578,7 @@ namespace Game unsigned __int64 steamID; // 278272 char __pad9[403592]; // 278280 } client_t; + #pragma pack(pop) static_assert(sizeof(client_t) == 0xA6790);