From 0cf3e1ff5452fc96ae7fe035deda46f9e07fa15f Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 18 Jul 2009 19:46:32 +0000 Subject: [PATCH] Freeze NQ demos while content is being loaded, so it starts at, urm, the start. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3299 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_demo.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/engine/client/cl_demo.c b/engine/client/cl_demo.c index f4bb21ba..533d03ef 100644 --- a/engine/client/cl_demo.c +++ b/engine/client/cl_demo.c @@ -394,6 +394,25 @@ qboolean CL_GetDemoMessage (void) ) { //read the nq demo + //if we've finished reading the connection part of the demo, but not finished loading, pause the demo + if (cls.signon == 1 && !cl.worldmodel) + { + demtime = cl.gametime; + return 0; + } + + //if this is the starting frame of a timedemo + if (cls.timedemo) + if (cls.td_startframe == -1 && cls.state == ca_active) + { //start the timer only once we are connected. + cls.td_starttime = Sys_DoubleTime(); + cls.td_startframe = host_framecount; + + //force the console up, we're done loading. + key_dest = key_game; + scr_con_current = 0; + } + #ifdef Q2CLIENT if (cls.demoplayback == DPB_QUAKE2 && (cls.netchan.last_received == realtime || cls.netchan.last_received > realtime-0.1)) return 0;