From 179f15c1d5314ee37c033f5e0e3bbf08cbc48efa Mon Sep 17 00:00:00 2001 From: Des Date: Mon, 5 Aug 2024 08:59:04 -0300 Subject: [PATCH] If already connected keep csprog data since downloading messages were already kept in demo_head variables. --- cl_demo.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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) -- 2.39.2