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)
{
{
int i, c;
- if (cls.state == ca_dedicated || COM_CheckParm("-listen"))
+ if (cls.state == ca_dedicated || COM_CheckParm("-listen") || COM_CheckParm("-benchmark") || COM_CheckParm("-demo") || COM_CheckParm("-demolooponly"))
return;
c = Cmd_Argc() - 1;
MR_Keydown( key, ascii );
break;
case key_game:
+ if (COM_CheckParm ("-demolooponly"))
+ {
+ CL_Disconnect ();
+ return;
+ }
MR_ToggleMenu_f();
break;
default:
} else {
// during demo playback, all keys ingame bring up the main menu
if( cls.demoplayback && !key_consoleactive && key_dest == key_game ) {
- MR_ToggleMenu_f ();
+ if (!COM_CheckParm ("-demolooponly"))
+ MR_ToggleMenu_f ();
return;
}