- if (*lpCmdLine)
- {
- if (*lpCmdLine == '\"')
- {
- // quoted string
- argv[com_argc] = lpCmdLine;
- com_argc++;
-
- while (*lpCmdLine && (*lpCmdLine != '\"'))
- lpCmdLine++;
-
- if (*lpCmdLine)
- {
- *lpCmdLine = 0;
- lpCmdLine++;
- }
-
- if (*lpCmdLine == '\"')
- lpCmdLine++;
- }
- else
- {
- // unquoted word
- argv[com_argc] = lpCmdLine;
- com_argc++;
-
- while (*lpCmdLine && *lpCmdLine > 32)
- lpCmdLine++;
-
- if (*lpCmdLine)
- {
- *lpCmdLine = 0;
- lpCmdLine++;
- }
- }
- }
- }
- com_argv = argv;
-
- Sys_Shared_EarlyInit();
-
- Cvar_RegisterVariable(&sys_usetimegettime);
-
- tevent = CreateEvent(NULL, false, false, NULL);
-
- if (!tevent)
- Sys_Error ("Couldn't create event");
-
- // LordHavoc: can't check cls.state because it hasn't been initialized yet
- // if (cls.state == ca_dedicated)
- if (COM_CheckParm("-dedicated"))
- {
- if (!AllocConsole ())
- Sys_Error ("Couldn't create dedicated server console");
-
- hinput = GetStdHandle (STD_INPUT_HANDLE);
- houtput = GetStdHandle (STD_OUTPUT_HANDLE);