From 386424a8e65ff57c7f139b64647ad6860f5c5445 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 29 Jan 2011 22:24:19 +0000 Subject: [PATCH] This should more closely match other engines in timedemo results. git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3729 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_demo.c | 31 ++++++++++++++++++------------- engine/client/cl_parse.c | 1 + engine/common/fs.c | 1 - 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/engine/client/cl_demo.c b/engine/client/cl_demo.c index 4486e2b67..ff0786a6b 100644 --- a/engine/client/cl_demo.c +++ b/engine/client/cl_demo.c @@ -534,21 +534,26 @@ readnext: // decide if it is time to grab the next message if (cls.timedemo) { - if (cls.td_lastframe < 0) - cls.td_lastframe = demotime; - else if (demotime > cls.td_lastframe) + if (cls.state == ca_active) { - cls.td_lastframe = demotime; - return 0; // already read this frame's message - } - 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; + if (cls.td_lastframe < 0) + cls.td_lastframe = host_framecount; + else if (host_framecount == cls.td_lastframe) + { + cls.td_lastframe = host_framecount; + return 0; // already read this frame's message + } + if (cls.td_startframe == -1) + { //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; + //force the console up, we're done loading. + key_dest = key_game; + scr_con_current = 0; + } + if (cls.td_startframe == host_framecount+1) + cls.td_starttime = Sys_DoubleTime(); } demtime = demotime; // warp } diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 7a14a9276..7c4490b77 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -2567,6 +2567,7 @@ Con_DPrintf ("CL_SignonReply: %i\n", cls.signon); { case 1: cl.sendprespawn = true; + CL_RequestNextDownload(); break; case 2: diff --git a/engine/common/fs.c b/engine/common/fs.c index c0897333d..fcb399910 100644 --- a/engine/common/fs.c +++ b/engine/common/fs.c @@ -479,7 +479,6 @@ int FS_FLocateFile(const char *filename, FSLF_ReturnType_e returntype, flocation char cleanpath[MAX_QPATH]; void *pf; -//Con_Printf("Finding %s: ", filename); filename = FS_GetCleanPath(filename, cleanpath, sizeof(cleanpath)); if (!filename)