Struct fixes

This commit is contained in:
Maurice Heumann 2023-04-10 15:05:11 +02:00
parent a44675aa68
commit 282d5e97a3

View File

@ -689,6 +689,7 @@ namespace game
byte color[4]; byte color[4];
const dvar_t* indirect[3]; const dvar_t* indirect[3];
} value; } value;
uint64_t encryptedValue; uint64_t encryptedValue;
}; };
@ -699,26 +700,31 @@ namespace game
int stringCount; int stringCount;
const char** strings; const char** strings;
} enumeration; } enumeration;
struct struct
{ {
int min; int min;
int max; int max;
} integer; } integer;
struct struct
{ {
int64_t min; int64_t min;
int64_t max; int64_t max;
} integer64; } integer64;
struct struct
{ {
uint64_t min; uint64_t min;
uint64_t max; uint64_t max;
} unsignedInt64; } unsignedInt64;
struct struct
{ {
float min; float min;
float max; float max;
} value; } value;
struct struct
{ {
vec_t min; vec_t min;
@ -1028,7 +1034,7 @@ namespace game
JoinResult joinResult; JoinResult joinResult;
}; };
#ifdef __cplusplus
namespace hks namespace hks
{ {
struct lua_State; struct lua_State;
@ -1108,11 +1114,14 @@ namespace game
TNUMBER = 0x3, TNUMBER = 0x3,
TSTRING = 0x4, TSTRING = 0x4,
TTABLE = 0x5, TTABLE = 0x5,
TFUNCTION = 0x6, // idk TFUNCTION = 0x6,
// idk
TUSERDATA = 0x7, TUSERDATA = 0x7,
TTHREAD = 0x8, TTHREAD = 0x8,
TIFUNCTION = 0x9, // Lua function TIFUNCTION = 0x9,
TCFUNCTION = 0xA, // C function // Lua function
TCFUNCTION = 0xA,
// C function
TUI64 = 0xB, TUI64 = 0xB,
TSTRUCT = 0xC, TSTRUCT = 0xC,
NUM_TYPE_OBJECTS = 0xE, NUM_TYPE_OBJECTS = 0xE,
@ -1533,6 +1542,7 @@ namespace game
HksError m_error; HksError m_error;
}; };
} }
#endif
typedef uint32_t ScrVarCanonicalName_t; typedef uint32_t ScrVarCanonicalName_t;
@ -1556,19 +1566,23 @@ namespace game
char __pad4[0x29DAC]; char __pad4[0x29DAC];
}; };
#ifdef __cplusplus
static_assert(sizeof(client_s) == 0xE5110); static_assert(sizeof(client_s) == 0xE5110);
static_assert(offsetof(game::client_s, address) == 0x2C); static_assert(offsetof(game::client_s, address) == 0x2C);
static_assert(offsetof(game::client_s, xuid) == 0x55C8); static_assert(offsetof(game::client_s, xuid) == 0x55C8);
static_assert(offsetof(game::client_s, guid) == 0xBB354); static_assert(offsetof(game::client_s, guid) == 0xBB354);
static_assert(offsetof(game::client_s, bIsTestClient) == 0xBB360); static_assert(offsetof(game::client_s, bIsTestClient) == 0xBB360);
#endif
struct client_s_cl : client_s struct client_s_cl : client_s
{ {
char __pad1_0[0x60]; char __pad1_0[0x60];
}; };
#ifdef __cplusplus
static_assert(sizeof(client_s_cl) == 0xE5170); static_assert(sizeof(client_s_cl) == 0xE5170);
#endif
enum scriptInstance_t enum scriptInstance_t
{ {
@ -1598,7 +1612,9 @@ namespace game
unsigned char __pad1[0x2A0]; unsigned char __pad1[0x2A0];
}; };
#ifdef __cplusplus
static_assert(sizeof(gentity_s) == 0x4F8); static_assert(sizeof(gentity_s) == 0x4F8);
#endif
enum workshop_type enum workshop_type
{ {
@ -1623,7 +1639,9 @@ namespace game
workshop_type type; workshop_type type;
}; };
#ifdef __cplusplus
static_assert(sizeof(workshop_data) == 0x4C8); static_assert(sizeof(workshop_data) == 0x4C8);
#endif
struct DDLMember struct DDLMember
{ {