// dedicated servers initialize the host but don't parse and set the
// config.cfg cvars
// LordHavoc: don't save a config if it crashed in startup
- if (host_framecount >= 3 && cls.state != ca_dedicated && !COM_CheckParm("-benchmark"))
+ if (host_framecount >= 3 && cls.state != ca_dedicated && !COM_CheckParm("-benchmark") && !COM_CheckParm("-capturedemo"))
{
f = FS_Open ("config.cfg", "wb", false, false);
if (!f)
// apply slowmo scaling
clframetime *= cl.movevars_timescale;
+ // scale playback speed of demos by slowmo cvar
+ if (cls.demoplayback)
+ {
+ clframetime *= slowmo.value;
+ // if demo playback is paused, don't advance time at all
+ if (cls.demopaused)
+ clframetime = 0;
+ }
// host_framerate overrides all else
if (host_framerate.value)
Cbuf_Execute();
}
+// COMMANDLINEOPTION: Client: -capturedemo <demoname> captures a playdemo and quits
+ i = COM_CheckParm("-capturedemo");
+ if (i && i + 1 < com_argc)
+ if (!sv.active && !cls.demoplayback && !cls.connect_trying)
+ {
+ Cbuf_AddText(va("playdemo %s\ncl_capturevideo 1\n", com_argv[i + 1]));
+ Cbuf_Execute();
+ }
+
if (cls.state == ca_dedicated || COM_CheckParm("-listen"))
if (!sv.active && !cls.demoplayback && !cls.connect_trying)
{
Con_Print("recursive shutdown\n");
return;
}
+ if (setjmp(host_abortframe))
+ {
+ Con_Print("aborted the quitting frame?!?\n");
+ return;
+ }
isdown = true;
// be quiet while shutting down