re-add support for changing client port (use +set cl_port foo)

This commit is contained in:
Adam Olsen 2001-05-30 18:50:17 +00:00
parent 8ca626dacc
commit de4ab28d38
2 changed files with 6 additions and 2 deletions

View file

@ -38,7 +38,7 @@
//=========================================
#define PORT_CLIENT 27001
#define PORT_CLIENT "27001"
#define PORT_MASTER 27000
#define PORT_SERVER 27500

View file

@ -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
{