+// 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 < com_argc)
{
if (LHNETADDRESS_FromString(&tempaddress, com_argv[i + 1], 0) == 1)
{
- Con_Printf("-ip option used, setting cl_netaddress and sv_netaddress to address \"%s\"\n");
- Cvar_SetQuick(&cl_netaddress, com_argv[i + 1]);
- Cvar_SetQuick(&sv_netaddress, com_argv[i + 1]);
+ Con_Printf("-ip option used, setting net_address to \"%s\"\n");
+ Cvar_SetQuick(&net_address, com_argv[i + 1]);
}
else
Con_Printf("-ip option used, but unable to parse the address \"%s\"\n", com_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 < com_argc)
{
i = atoi(com_argv[i + 1]);
if (i >= 0 && i < 65536)
{
Con_Printf("-port option used, setting port cvar to %i\n", i);
- Cvar_SetQuick(&sv_netport, i);
+ Cvar_SetValueQuick(&sv_netport, i);
}
else
Con_Printf("-port option used, but %i is not a valid port number\n", i);