Browse Source

engine: remove PORT_CLIENT, we should randomize client port by default, thus allowing easier connections from same IP address

pull/2/head
Alibek Omarov 1 year ago
parent
commit
34fa1b5ec8
  1. 3
      engine/common/net_ws.c
  2. 1
      engine/common/netchan.h

3
engine/common/net_ws.c

@ -2113,9 +2113,6 @@ void NET_Init( void )
Q_snprintf( cmd, sizeof( cmd ), "%i", PORT_SERVER ); Q_snprintf( cmd, sizeof( cmd ), "%i", PORT_SERVER );
Cvar_FullSet( "hostport", cmd, FCVAR_READ_ONLY ); Cvar_FullSet( "hostport", cmd, FCVAR_READ_ONLY );
Q_snprintf( cmd, sizeof( cmd ), "%i", PORT_CLIENT );
Cvar_FullSet( "clientport", cmd, FCVAR_READ_ONLY );
// cvar equivalents for IPv6 // cvar equivalents for IPv6
Cvar_RegisterVariable( &net_ip6name ); Cvar_RegisterVariable( &net_ip6name );
Cvar_RegisterVariable( &net_ip6hostport ); Cvar_RegisterVariable( &net_ip6hostport );

1
engine/common/netchan.h

@ -73,7 +73,6 @@ GNU General Public License for more details.
#define MS_SCAN_REQUEST "1\xFF" "0.0.0.0:0\0" #define MS_SCAN_REQUEST "1\xFF" "0.0.0.0:0\0"
#define PORT_MASTER 27010 #define PORT_MASTER 27010
#define PORT_CLIENT 27005
#define PORT_SERVER 27015 #define PORT_SERVER 27015
#define MULTIPLAYER_BACKUP 64 // how many data slots to use when in multiplayer (must be power of 2) #define MULTIPLAYER_BACKUP 64 // how many data slots to use when in multiplayer (must be power of 2)

Loading…
Cancel
Save