X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=cl_demo.c;h=26265ff48553abc15a439f7f461ba6ea8fbca9ec;hb=fc64981df559aafe9ebe54d08ddf0da4ee94f293;hp=e60ac367d64fa0760c4a0d10a2c24ff652a0f8b2;hpb=2c49845a7e2ee4b5c98a652f7f7414da32cb6b06;p=xonotic%2Fdarkplaces.git diff --git a/cl_demo.c b/cl_demo.c index e60ac367..26265ff4 100644 --- a/cl_demo.c +++ b/cl_demo.c @@ -20,7 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" +#ifdef CONFIG_VIDEO_CAPTURE extern cvar_t cl_capturevideo; +extern cvar_t cl_capturevideo_demo_stop; +#endif int old_vsync = 0; static void CL_FinishTimeDemo (void); @@ -78,6 +81,11 @@ Called when a demo file runs out, or the user starts a game // LordHavoc: now called only by CL_Disconnect void CL_StopPlayback (void) { +#ifdef CONFIG_VIDEO_CAPTURE + if (cl_capturevideo_demo_stop.integer) + Cvar_Set("cl_capturevideo", "0"); +#endif + if (!cls.demoplayback) return; @@ -231,7 +239,7 @@ void CL_ReadDemoMessage(void) cls.td_onesecondnexttime++; } } - else if (cl.time <= cl.mtime[0]) + else if (cl.time < cl.mtime[0]) { // don't need another message yet return; @@ -609,6 +617,5 @@ void CL_TimeDemo_f (void) cls.timedemo = true; cls.td_frames = -2; // skip the first frame cls.demonum = -1; // stop demo loop - cls.demonum = -1; // stop demo loop }