Skip to content

Commit

Permalink
engine: client: remove svc_goldsrc_* definitions for message that sem…
Browse files Browse the repository at this point in the history
…antics matches Xash3D 49 protocol and instead use it's definitions
  • Loading branch information
a1batross committed Dec 19, 2024
1 parent 0637dba commit 3f1eed9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
12 changes: 6 additions & 6 deletions engine/client/cl_parse_gs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 0 additions & 6 deletions engine/common/net_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
6 changes: 0 additions & 6 deletions engine/common/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3f1eed9

Please sign in to comment.