From 918890514516603f49e1ee09425e3acde89c0e47 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 10 Oct 2024 23:33:46 +0300 Subject: [PATCH] engine: client: fix map CRC match with GoldSrc protocol --- engine/client/cl_parse.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 53663b85..74acc4cd 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -904,10 +904,14 @@ void CL_ParseServerData( sizebuf_t *msg, connprotocol_t proto ) MSG_ReadBytes( msg, clientdllmd5, sizeof( clientdllmd5 )); cl.maxclients = MSG_ReadByte( msg ); cl.playernum = MSG_ReadByte( msg ); + + COM_UnMunge3((byte *)&cl.checksum, sizeof( cl.checksum ), ( 0xff - cl.playernum ) & 0xff ); + unused = MSG_ReadByte( msg ); // coop flag Q_strncpy( gamefolder, MSG_ReadString( msg ), sizeof( gamefolder )); MSG_ReadString( msg ); // hostname - Q_strncpy( clgame.mapname, MSG_ReadString( msg ), sizeof( clgame.mapname )); + Q_strncpy( clgame.mapname, COM_FileWithoutPath( MSG_ReadString( msg )), sizeof( clgame.mapname )); + COM_StripExtension( clgame.mapname ); MSG_ReadString( msg ); // mapcycle????? unused = MSG_ReadByte( msg ); // vac secure