From de4ab28d38ef5083037adc62dccc973a59e49c17 Mon Sep 17 00:00:00 2001 From: Adam Olsen Date: Wed, 30 May 2001 18:50:17 +0000 Subject: [PATCH] re-add support for changing client port (use +set cl_port foo) --- qw/include/protocol.h | 2 +- qw/source/cl_main.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/qw/include/protocol.h b/qw/include/protocol.h index e846d3493..b35ee9b6d 100644 --- a/qw/include/protocol.h +++ b/qw/include/protocol.h @@ -38,7 +38,7 @@ //========================================= -#define PORT_CLIENT 27001 +#define PORT_CLIENT "27001" #define PORT_MASTER 27000 #define PORT_SERVER 27500 diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index abcb4ca62..fbcf0e6e2 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -147,6 +147,8 @@ cvar_t *cl_solid_players; cvar_t *localid; +cvar_t *cl_port; + static qboolean allowremotecmd = true; /* info mirrors */ @@ -1296,6 +1298,8 @@ CL_Init_Cvars (void) "4 is none"); noaim = Cvar_Get ("noaim", "0", CVAR_ARCHIVE | CVAR_USERINFO, Cvar_Info, "Auto aim off switch. Set to 1 to turn off."); + cl_port = Cvar_Get ("cl_port", PORT_CLIENT, CVAR_NONE, Cvar_Info, + "UDP Port for client to use."); R_Particles_Init_Cvars (); } @@ -1627,7 +1631,7 @@ Host_Init (void) Game_Init (); COM_Init (); - NET_Init (PORT_CLIENT); + NET_Init (cl_port->int_val); Netchan_Init (); #ifdef PACKET_LOGGING {