+
+ Con_DPrint("========Initialized=========\n");
+
+ if (cls.state != ca_dedicated)
+ {
+ VID_Open();
+ CDAudio_Startup();
+ CL_InitTEnts (); // We must wait after sound startup to load tent sounds
+ SCR_BeginLoadingPlaque();
+ MR_Init();
+ }
+
+ // set up the default startmap_sp and startmap_dm aliases, mods can
+ // override these
+ if (gamemode == GAME_NEHAHRA)
+ {
+ Cbuf_InsertText ("alias startmap_sp \"map nehstart\"\n");
+ Cbuf_InsertText ("alias startmap_dm \"map nehstart\"\n");
+ }
+ else if (gamemode == GAME_TRANSFUSION)
+ {
+ Cbuf_InsertText ("alias startmap_sp \"map e1m1\"\n");
+ Cbuf_InsertText ("alias startmap_dm \"map bb1\"\n");
+ }
+ else if (gamemode == GAME_NEXUIZ)
+ {
+ Cbuf_InsertText ("alias startmap_sp \"map nexdm01\"\n");
+ Cbuf_InsertText ("alias startmap_dm \"map nexdm01\"\n");
+ }
+ else
+ {
+ Cbuf_InsertText ("alias startmap_sp \"map start\"\n");
+ Cbuf_InsertText ("alias startmap_dm \"map start\"\n");
+ }
+
+ // stuff it again so the first host frame will execute it again, this time
+ // in its entirety
+ if (gamemode == GAME_TEU)
+ Cbuf_InsertText("exec teu.rc\n");
+ else
+ Cbuf_InsertText("exec quake.rc\n");
+
+ Cbuf_Execute();
+ Cbuf_Execute();
+ Cbuf_Execute();
+
+ if (!sv.active && (cls.state == ca_dedicated || COM_CheckParm("-listen")))
+ Cbuf_InsertText ("startmap_dm\n");
+
+ // check for special benchmark mode
+// COMMANDLINEOPTION: Client: -benchmark <demoname> runs a timedemo and quits, results of any timedemo can be found in gamedir/benchmark.log (for example id1/benchmark.log)
+ i = COM_CheckParm("-benchmark");
+ if (i && i + 1 < com_argc && !sv.active)
+ Cbuf_InsertText(va("timedemo %s\n", com_argv[i + 1]));
+
+ if (!sv.active && !cls.demoplayback && !cls.connect_trying)
+ Cbuf_InsertText("togglemenu\n");
+
+ Cbuf_Execute();
+
+ // We must wait for the log_file cvar to be initialized to start the log
+ Log_Start ();