- cls.state = ca_dedicated;
- numplayers = 0;
- if (i != (com_argc - 1))
- numplayers = atoi (com_argv[i+1]);
+ // client exists, check what mode the user wants
+ i = COM_CheckParm ("-dedicated");
+ if (i)
+ {
+ cls.state = ca_dedicated;
+ numplayers = 8;
+ if (i != (com_argc - 1))
+ numplayers = atoi (com_argv[i+1]);
+ if (COM_CheckParm ("-listen"))
+ Sys_Error ("Only one of -dedicated or -listen can be specified");
+ }
+ else
+ {
+ numplayers = 1;
+ cls.state = ca_disconnected;
+ i = COM_CheckParm ("-listen");
+ if (i)
+ {
+ numplayers = 8;
+ if (i != (com_argc - 1))
+ numplayers = atoi (com_argv[i+1]);
+ }
+ }