From 3f1eed9f599d0cf8bc305331efbe2d0d27b637f3 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 20 Dec 2024 01:48:30 +0300 Subject: [PATCH] engine: client: remove svc_goldsrc_* definitions for message that semantics matches Xash3D 49 protocol and instead use it's definitions --- engine/client/cl_parse_gs.c | 12 ++++++------ engine/common/net_buffer.c | 6 ------ engine/common/protocol.h | 6 ------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/engine/client/cl_parse_gs.c b/engine/client/cl_parse_gs.c index d083a33c91..0e3bdb8ac9 100644 --- a/engine/client/cl_parse_gs.c +++ b/engine/client/cl_parse_gs.c @@ -615,7 +615,7 @@ void CL_ParseGoldSrcServerMessage( sizebuf_t *msg ) case svc_setangle: CL_ParseSetAngle( msg ); break; - case svc_goldsrc_serverinfo: + case svc_serverdata: Cbuf_Execute(); // make sure any stuffed commands are done CL_ParseServerData( msg, PROTO_GOLDSRC ); break; @@ -625,7 +625,7 @@ void CL_ParseGoldSrcServerMessage( sizebuf_t *msg ) case svc_updateuserinfo: CL_UpdateUserinfo( msg, PROTO_GOLDSRC ); break; - case svc_goldsrc_deltadescription: + case svc_deltatable: Delta_ParseTableField_GS( msg ); break; case svc_clientdata: @@ -687,7 +687,7 @@ void CL_ParseGoldSrcServerMessage( sizebuf_t *msg ) case svc_addangle: CL_ParseAddAngle( msg ); break; - case svc_goldsrc_newusermsg: + case svc_usermessage: CL_RegisterUserMessage( msg, PROTO_GOLDSRC ); break; case svc_packetentities: @@ -709,7 +709,7 @@ void CL_ParseGoldSrcServerMessage( sizebuf_t *msg ) CL_ParseResourceList( msg, PROTO_GOLDSRC ); MSG_EndBitWriting( msg ); break; - case svc_goldsrc_newmovevars: + case svc_deltamovevars: CL_ParseNewMovevars( msg ); break; case svc_resourcerequest: @@ -749,10 +749,10 @@ void CL_ParseGoldSrcServerMessage( sizebuf_t *msg ) Con_Reportf( S_ERROR "%s: svc_goldsrc_timescale: implement me!\n", __func__ ); MSG_ReadFloat( msg ); break; - case svc_goldsrc_sendcvarvalue: + case svc_querycvarvalue: CL_ParseCvarValue( msg, false, PROTO_GOLDSRC ); break; - case svc_goldsrc_sendcvarvalue2: + case svc_querycvarvalue2: CL_ParseCvarValue( msg, true, PROTO_GOLDSRC ); break; case svc_exec: diff --git a/engine/common/net_buffer.c b/engine/common/net_buffer.c index 0df8b071c3..8a8a629e80 100644 --- a/engine/common/net_buffer.c +++ b/engine/common/net_buffer.c @@ -101,20 +101,14 @@ const char *const svc_legacy_strings[svc_lastmsg+1] = const char *const svc_goldsrc_strings[svc_lastmsg+1] = { [svc_goldsrc_version] = "svc_goldsrc_version", - [svc_goldsrc_serverinfo] = "svc_goldsrc_serverinfo", - [svc_goldsrc_deltadescription] = "svc_goldsrc_deltadescription", [svc_goldsrc_stopsound] = "svc_goldsrc_stopsound", [svc_goldsrc_damage] = "svc_goldsrc_damage", [svc_goldsrc_killedmonster] = "svc_goldsrc_killedmonster", [svc_goldsrc_foundsecret] = "svc_goldsrc_foundsecret", [svc_goldsrc_spawnstaticsound] = "svc_goldsrc_spawnstaticsound", [svc_goldsrc_decalname] = "svc_goldsrc_decalname", - [svc_goldsrc_newusermsg] = "svc_goldsrc_newusermsg", - [svc_goldsrc_newmovevars] = "svc_goldsrc_newmovevars", [svc_goldsrc_sendextrainfo] = "svc_goldsrc_sendextrainfo", [svc_goldsrc_timescale] = "svc_goldsrc_timescale", - [svc_goldsrc_sendcvarvalue] = "svc_goldsrc_sendcvarvalue", - [svc_goldsrc_sendcvarvalue2] = "svc_goldsrc_sendcvarvalue2", }; const char *const svc_quake_strings[svc_lastmsg+1] = diff --git a/engine/common/protocol.h b/engine/common/protocol.h index c2ecacf0ec..abc361e1ac 100644 --- a/engine/common/protocol.h +++ b/engine/common/protocol.h @@ -324,20 +324,14 @@ extern const char *const clc_strings[clc_lastmsg+1]; #define PROTOCOL_GOLDSRC_VERSION 48 #define svc_goldsrc_version svc_changing -#define svc_goldsrc_serverinfo svc_serverdata -#define svc_goldsrc_deltadescription svc_deltatable #define svc_goldsrc_stopsound svc_resource #define svc_goldsrc_damage svc_restoresound #define svc_goldsrc_killedmonster 27 #define svc_goldsrc_foundsecret 28 #define svc_goldsrc_spawnstaticsound 29 #define svc_goldsrc_decalname svc_bspdecal -#define svc_goldsrc_newusermsg svc_usermessage -#define svc_goldsrc_newmovevars svc_deltamovevars #define svc_goldsrc_sendextrainfo 54 #define svc_goldsrc_timescale 55 -#define svc_goldsrc_sendcvarvalue svc_querycvarvalue -#define svc_goldsrc_sendcvarvalue2 svc_querycvarvalue2 #define clc_goldsrc_hltv clc_requestcvarvalue // 9 #define clc_goldsrc_requestcvarvalue clc_requestcvarvalue2 // 10