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

2
engine/common/netchan.h

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

Loading…
Cancel
Save