From 2b85da3bc9555a2b5dc11886d9f9fe1350f0d5c1 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 14 Oct 2024 03:20:16 +0300 Subject: [PATCH] engine: client: fix parsing svc_setpause and svc_goldsrc_timescale for GoldSrc protocol --- engine/client/cl_parse_gs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engine/client/cl_parse_gs.c b/engine/client/cl_parse_gs.c index a8db793c..58c43d07 100644 --- a/engine/client/cl_parse_gs.c +++ b/engine/client/cl_parse_gs.c @@ -636,7 +636,7 @@ void CL_ParseGoldSrcServerMessage( sizebuf_t *msg ) MSG_EndBitWriting( msg ); break; case svc_setpause: - cl.paused = ( MSG_ReadOneBit( msg ) != 0 ); + cl.paused = ( MSG_ReadByte( msg ) != 0 ); break; case svc_signonnum: CL_ParseSignon( msg, PROTO_GOLDSRC ); @@ -712,6 +712,12 @@ void CL_ParseGoldSrcServerMessage( sizebuf_t *msg ) case svc_resourcelocation: CL_ParseResLocation( msg ); break; + case svc_goldsrc_timescale: + // we can set sys_timescale to anything we want but in GoldSrc it's locked for + // HLTV and demoplayback. Do we really want to have it then if both are out of scope? + Con_Reportf( S_ERROR "%s: svc_goldsrc_timescale: implement me!\n", __func__ ); + MSG_ReadFloat( msg ); + break; case svc_goldsrc_sendextrainfo: CL_ParseExtraInfo( msg ); break;