From f633b3dbf66342f72361f903bd02024b1ee537e8 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 27 Aug 2022 22:12:32 +0300 Subject: [PATCH] engine: increase MAX_INIT_MSG to 192 kilobytes limit * also avoid magic number in sv_client.c --- engine/common/net_ws.h | 4 ++-- engine/server/sv_client.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/common/net_ws.h b/engine/common/net_ws.h index 75329383..5ab40ecd 100644 --- a/engine/common/net_ws.h +++ b/engine/common/net_ws.h @@ -31,9 +31,9 @@ typedef enum #if !XASH_LOW_MEMORY -#define MAX_INIT_MSG 0x20000 // max length of possible message +#define MAX_INIT_MSG 0x30000 // max length of possible message #else -#define MAX_INIT_MSG 0x8000 +#define MAX_INIT_MSG 0x8000 #endif // net packets type #define NET_HEADER_OUTOFBANDPACKET -1 diff --git a/engine/server/sv_client.c b/engine/server/sv_client.c index 2193881f..cbf5d912 100644 --- a/engine/server/sv_client.c +++ b/engine/server/sv_client.c @@ -1316,7 +1316,7 @@ a deathmatch. */ void SV_PutClientInServer( sv_client_t *cl ) { - static byte msg_buf[0x20200]; // MAX_INIT_MSG + some space + static byte msg_buf[MAX_INIT_MSG + 0x200]; // MAX_INIT_MSG + some space edict_t *ent = cl->edict; sizebuf_t msg;