Fix client_t struct

This commit is contained in:
Federico Cecchetto 2022-03-11 21:41:17 +01:00
parent 60a9340c2a
commit 4cd1334b94
2 changed files with 8 additions and 6 deletions

View File

@ -259,10 +259,10 @@ namespace patches
dvars::override::register_int("com_maxfps", 0, 0, 1000, game::DVAR_FLAG_SAVED);
// Prevent clients from ending the game as non host by sending 'end_game' lui notification
// cmd_lui_notify_server_hook.create(0x140335A70, cmd_lui_notify_server_stub);
cmd_lui_notify_server_hook.create(0x140335A70, cmd_lui_notify_server_stub);
// Prevent clients from sending invalid reliableAcknowledge
// utils::hook::call(0x1404899C6, sv_execute_client_message_stub);
utils::hook::call(0x1404899C6, sv_execute_client_message_stub);
// "fix" for rare 'Out of memory error' error
if (utils::flags::has_flag("memoryfix"))

View File

@ -1382,17 +1382,17 @@ namespace game
struct clientHeader_t
{
int state;
char __pad0[36];
char __pad0[44];
netadr_s remoteAddress;
}; // size = ?
struct client_t
{
clientHeader_t header;
char __pad0[3044];
char __pad0[265164];
int reliableSequence;
int reliableAcknowledge;
char __pad1[265864];
char __pad1[265832];
gentity_s* gentity; // 268976
char name[32]; // 268984
char __pad2[8];
@ -1401,8 +1401,10 @@ namespace game
LiveClientDropType liveDropRequest; //269572
char __pad4[24];
TestClientType testClient; // 269600
char __pad5[610012];
char __pad5[129600];
}; // size = 661304
static_assert(sizeof(client_t) == 661304);
}
namespace sp