+ // 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)
+ if (!sv.active && !cls.demoplayback && !cls.connect_trying)
+ {
+ Cbuf_AddText(va("timedemo %s\n", com_argv[i + 1]));
+ Cbuf_Execute();
+ }
+
+ // check for special demo mode
+// COMMANDLINEOPTION: Client: -demo <demoname> runs a playdemo and quits
+ i = COM_CheckParm("-demo");
+ if (i && i + 1 < com_argc)
+ if (!sv.active && !cls.demoplayback && !cls.connect_trying)
+ {
+ Cbuf_AddText(va("playdemo %s\n", com_argv[i + 1]));
+ Cbuf_Execute();
+ }
+
+ // check for special demolooponly mode
+// COMMANDLINEOPTION: Client: -demolooponly <demoname> runs a playdemo and quits
+ i = COM_CheckParm("-demolooponly");
+ if (i && i + 1 < com_argc)
+ if (!sv.active && !cls.demoplayback && !cls.connect_trying)
+ {
+ Cbuf_AddText(va("playdemo %s\n", com_argv[i + 1]));
+ Cbuf_Execute();
+ }
+
+ if (cls.state == ca_dedicated || COM_CheckParm("-listen"))
+ if (!sv.active && !cls.demoplayback && !cls.connect_trying)
+ {
+ Cbuf_AddText("startmap_dm\n");
+ Cbuf_Execute();
+ }
+
+ if (!sv.active && !cls.demoplayback && !cls.connect_trying)
+ {
+ if (gamemode == GAME_NEXUIZ)
+ Cbuf_AddText("togglemenu\nplayvideo logo\ncd loop 1\n");
+ else
+ Cbuf_AddText("togglemenu\n");
+ Cbuf_Execute();
+ }
+
+ Con_DPrint("========Initialized=========\n");
+
+ Host_StartVideo();