- }
- 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);
-
- // give QHOST a chance to hook into the console
- if ((t = COM_CheckParm ("-HFILE")) > 0)
- {
- if (t < com_argc)
- hFile = (HANDLE)atoi (com_argv[t+1]);
- }
-
- if ((t = COM_CheckParm ("-HPARENT")) > 0)