From: Des Date: Mon, 5 Aug 2024 11:59:04 +0000 (-0300) Subject: If already connected keep csprog data since downloading messages were already kept... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=179f15c1d5314ee37c033f5e0e3bbf08cbc48efa;p=xonotic%2Fdarkplaces.git If already connected keep csprog data since downloading messages were already kept in demo_head variables. --- diff --git a/cl_demo.c b/cl_demo.c index 077f9770..9097fed1 100644 --- 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)