Add cvar "protocol" so user can change protocol version on command line, for standalone games. Most of the patch by Simon McVittie with a few minor modifications by myself
This commit is contained in:
parent
3639108763
commit
0387b8002e
7 changed files with 14 additions and 6 deletions
|
@ -2124,7 +2124,7 @@ void CL_CheckForResend( void ) {
|
|||
port = Cvar_VariableValue ("net_qport");
|
||||
|
||||
Q_strncpyz( info, Cvar_InfoString( CVAR_USERINFO ), sizeof( info ) );
|
||||
Info_SetValueForKey( info, "protocol", va("%i", PROTOCOL_VERSION ) );
|
||||
Info_SetValueForKey( info, "protocol", va("%i", com_protocol->integer ) );
|
||||
Info_SetValueForKey( info, "qport", va("%i", port ) );
|
||||
Info_SetValueForKey( info, "challenge", va("%i", clc.challenge ) );
|
||||
|
||||
|
@ -3405,7 +3405,7 @@ void CL_ServerInfoPacket( netadr_t from, msg_t *msg ) {
|
|||
|
||||
// if this isn't the correct protocol version, ignore it
|
||||
prot = atoi( Info_ValueForKey( infoString, "protocol" ) );
|
||||
if ( prot != PROTOCOL_VERSION ) {
|
||||
if ( prot != com_protocol->integer ) {
|
||||
Com_DPrintf( "Different protocol info packet: %s\n", infoString );
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue