]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
If already connected keep csprog data since downloading messages were already kept...
authorDes <xon@damianv.com.ar>
Mon, 5 Aug 2024 11:59:04 +0000 (08:59 -0300)
committerDes <xon@damianv.com.ar>
Mon, 5 Aug 2024 11:59:04 +0000 (08:59 -0300)
cl_demo.c

index 077f97703afa339db3d51e89856e1f27e99e7d55..9097fed1e4ca259ed1e1eec9ed2fd424d5344ba6 100644 (file)
--- a/cl_demo.c
+++ b/cl_demo.c
@@ -419,16 +419,12 @@ void CL_Record_f(cmd_state_t *cmd)
        FS_Printf(cls.demofile, "%i\n", cls.forcetrack);
 
        cls.demorecording = true;
-       cls.demo_lastcsprogssize = -1;
-       cls.demo_lastcsprogscrc = -1;
 
        // from ProQuake: initialize the demo file if we're already connected
        if (c == 2 && cls.state == ca_connected)
        {
                sizebuf_t buf;
                unsigned char tmpbuf[NET_MAXMESSAGE];
-               int cursize = buf.cursize;
-               int maxsize = buf.maxsize;
                int i, count;
 
                buf.data = demo_head;
@@ -493,6 +489,11 @@ void CL_Record_f(cmd_state_t *cmd)
                CL_WriteDemoMessage(&buf);
 
        }
+       else
+       {
+               cls.demo_lastcsprogssize = -1;
+               cls.demo_lastcsprogscrc = -1;
+       }
 }
 
 void CL_PlayDemo(const char *demo)