Skip to content

Commit

Permalink
engine: client: get rid of PROTOCOL_GOLDSRC_VERSION, as connprotocol_…
Browse files Browse the repository at this point in the history
…t enum does it's job
  • Loading branch information
a1batross committed Oct 8, 2024
1 parent 3a1bb12 commit 03bf6cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions engine/client/cl_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ GNU General Public License for more details.
#define IDEMOHEADER (('M'<<24)+('E'<<16)+('D'<<8)+'I') // little-endian "IDEM"
#define DEMO_PROTOCOL 3

#define PROTOCOL_GOLDSRC_VERSION_DEMO (PROTOCOL_GOLDSRC_VERSION | (BIT( 7 ))) // should be 48, only to differentiate it from PROTOCOL_LEGACY_VERSION

const char *demo_cmd[dem_lastcmd+1] =
{
"dem_unknown",
Expand Down Expand Up @@ -120,7 +122,7 @@ static int CL_GetDemoNetProtocol( connprotocol_t proto )
case PROTO_QUAKE:
return PROTOCOL_VERSION_QUAKE;
case PROTO_GOLDSRC:
return PROTOCOL_GOLDSRC_VERSION;
return PROTOCOL_GOLDSRC_VERSION_DEMO;
}

return PROTOCOL_VERSION;
Expand All @@ -136,7 +138,7 @@ static connprotocol_t CL_GetProtocolFromDemo( int net_protocol )
return PROTO_LEGACY;
case PROTOCOL_VERSION_QUAKE:
return PROTO_QUAKE;
case PROTOCOL_GOLDSRC_VERSION:
case PROTOCOL_GOLDSRC_VERSION_DEMO:
return PROTO_GOLDSRC;
}

Expand Down
3 changes: 1 addition & 2 deletions engine/common/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,7 @@ extern const char *clc_strings[clc_lastmsg+1];
#define MS_SCAN_REQUEST "1\xFF" "0.0.0.0:0\0" // TODO: implement IP filter

// GoldSrc protocol definitions
#define PROTOCOL_GOLDSRC_VERSION_REAL 48
#define PROTOCOL_GOLDSRC_VERSION (PROTOCOL_GOLDSRC_VERSION_REAL | (BIT( 7 ))) // should be 48, only to differentiate it from PROTOCOL_LEGACY_VERSION
#define PROTOCOL_GOLDSRC_VERSION 48

#define svc_goldsrc_version svc_changing
#define svc_goldsrc_serverinfo svc_serverdata
Expand Down

0 comments on commit 03bf6cb

Please sign in to comment.