Browse Source

legacymode: Mark old netsplit extension legacy, fix magic number

pull/2/head
mittorn 6 years ago
parent
commit
7bb8124b69
  1. 6
      engine/client/cl_main.c
  2. 2
      engine/common/netchan.h

6
engine/client/cl_main.c

@ -1038,8 +1038,8 @@ void CL_SendConnectPacket( void ) @@ -1038,8 +1038,8 @@ void CL_SendConnectPacket( void )
Info_SetValueForKey( protinfo, "a", Q_buildarch(), sizeof( protinfo ) );
Info_SetValueForKey( protinfo, "i", ID_GetMD5(), sizeof( protinfo ) );
Netchan_OutOfBandPrint( NS_CLIENT, adr, "connect %i %i %i \"%s\" 2 \"%s\"\n",
PROTOCOL_LEGACY_VERSION, Q_atoi( qport ), cls.challenge, cls.userinfo, protinfo );
Netchan_OutOfBandPrint( NS_CLIENT, adr, "connect %i %i %i \"%s\" %d \"%s\"\n",
PROTOCOL_LEGACY_VERSION, Q_atoi( qport ), cls.challenge, cls.userinfo, NET_LEGACY_EXT_SPLIT, protinfo );
Con_Printf( "Trying to connect by legacy protocol\n" );
}
else
@ -1392,7 +1392,7 @@ void CL_Reconnect( qboolean setup_netchan ) @@ -1392,7 +1392,7 @@ void CL_Reconnect( qboolean setup_netchan )
{
unsigned int extensions = Q_atoi( Cmd_Argv( 1 ) );
if( extensions & NET_EXT_SPLIT )
if( extensions & NET_LEGACY_EXT_SPLIT )
{
// only enable incoming split for legacy mode
cls.netchan.split = true;

2
engine/common/netchan.h

@ -84,7 +84,7 @@ GNU General Public License for more details. @@ -84,7 +84,7 @@ GNU General Public License for more details.
#define NUM_PACKET_ENTITIES 256 // 170 Mb for multiplayer with 32 players
#define MAX_CUSTOM_BASELINES 64
#define NET_EXT_SPLIT (1U<<1)
#define NET_LEGACY_EXT_SPLIT (1U<<1)
#define NETSPLIT_BACKUP 8
#define NETSPLIT_BACKUP_MASK (NETSPLIT_BACKUP - 1)
#define NETSPLIT_HEADER_SIZE 18

Loading…
Cancel
Save