Fix xuid offset

This commit is contained in:
momo5502 2023-04-07 13:55:43 +02:00
parent 363f8cb01a
commit 9e7a567acb
3 changed files with 9 additions and 11 deletions

View File

@ -115,8 +115,6 @@ namespace bots
struct component final : generic_component
{
static_assert(offsetof(game::client_s, bIsTestClient) == 0xBB360);
void post_unpack() override
{
utils::hook::jump(game::select(0x141653B70, 0x1402732E0), get_bot_name);

View File

@ -76,7 +76,7 @@ namespace dedicated_patches
return 0;
}
return static_cast<uint64_t>(clients[client_num].guid);
return clients[client_num].xuid;
}
}

View File

@ -1547,21 +1547,21 @@ namespace game
int client_state;
char __pad0[0x28];
netadr_t address;
char __pad1[0xBB318];
int guid;
char __pad2[0x8];
bool bIsTestClient;
char __pad3[0x25818];
char __pad1[0x5588];
uint64_t xuid;
char __pad4[0x4588];
char __pad2[0xB5D84];
int guid;
char __pad3[0x8];
bool bIsTestClient;
char __pad4[0x29DAC];
};
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, xuid) == 0x55C8);
static_assert(offsetof(game::client_s, guid) == 0xBB354);
static_assert(offsetof(game::client_s, bIsTestClient) == 0xBB360);
static_assert(offsetof(game::client_s, xuid) == 0xE0B80);
struct client_s_cl : client_s
{