+ // if no client is in the executable or -dedicated is specified on
+ // commandline, start a dedicated server
+ i = COM_CheckParm ("-dedicated");
+ if (i || !cl_available)
+ {
+ cls.state = ca_dedicated;
+ // check for -dedicated specifying how many players
+ if (i && i + 1 < com_argc && atoi (com_argv[i+1]) >= 1)
+ svs.maxclients = atoi (com_argv[i+1]);
+ if (COM_CheckParm ("-listen"))
+ Con_Printf ("Only one of -dedicated or -listen can be specified");
+ // default sv_public on for dedicated servers (often hosted by serious administrators), off for listen servers (often hosted by clueless users)
+ Cvar_SetValue("sv_public", 1);
+ }
+ else if (cl_available)