port = bound(0, sv_netport.integer, 65535);
if (port == 0)
port = 26000;
- Con_Printf("Server using port %i\n", port);
if (sv_netport.integer != port)
Cvar_SetValueQuick(&sv_netport, port);
if (cls.state != ca_dedicated)
// reset move sequence numbering on this new connection
cls.servermovesequence = 0;
if (cls.protocol == PROTOCOL_QUAKEWORLD)
- Cmd_ForwardStringToServer("new");
+ CL_ForwardToServer("new");
if (cls.protocol == PROTOCOL_QUAKE)
{
// write a keepalive (clc_nop) as it seems to greatly improve the
if(l)
{
client_t *host_client_save = host_client;
- Cmd_ExecuteString(&cmd_server, s, src_command, true);
+ Cmd_ExecuteString(&cmd_server, s, src_local, true);
host_client = host_client_save;
// in case it is a command that changes host_client (like restart)
}
Cvar_RegisterVariable(&gameversion_min);
Cvar_RegisterVariable(&gameversion_max);
// COMMANDLINEOPTION: Server: -ip <ipaddress> sets the ip address of this machine for purposes of networking (default 0.0.0.0 also known as INADDR_ANY), use only if you have multiple network adapters and need to choose one specifically.
- if ((i = COM_CheckParm("-ip")) && i + 1 < sys.argc)
+ if ((i = Sys_CheckParm("-ip")) && i + 1 < sys.argc)
{
if (LHNETADDRESS_FromString(&tempaddress, sys.argv[i + 1], 0) == 1)
{
Con_Printf(CON_ERROR "-ip option used, but unable to parse the address \"%s\"\n", sys.argv[i + 1]);
}
// COMMANDLINEOPTION: Server: -port <portnumber> sets the port to use for a server (default 26000, the same port as QUAKE itself), useful if you host multiple servers on your machine
- if (((i = COM_CheckParm("-port")) || (i = COM_CheckParm("-ipport")) || (i = COM_CheckParm("-udpport"))) && i + 1 < sys.argc)
+ if (((i = Sys_CheckParm("-port")) || (i = Sys_CheckParm("-ipport")) || (i = Sys_CheckParm("-udpport"))) && i + 1 < sys.argc)
{
i = atoi(sys.argv[i + 1]);
if (i >= 0 && i < 65536)