]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_demo.c
demos: support curl/dlcache (down)loading at start of playback
[xonotic/darkplaces.git] / cl_demo.c
index 502a7fac4581fe0aa5ed7d9b51ecd3d1b5810651..268e66dd87ed7cdf3bc34fff6e6c1468c71e8233 100644 (file)
--- a/cl_demo.c
+++ b/cl_demo.c
@@ -244,6 +244,13 @@ void CL_ReadDemoMessage(void)
                        }
                }
 
+               /* At signon 1 the cl_begindownloads command starts the world and, if applicable,
+                * boots up CSQC which may be required to parse the next message.
+                * That will be delayed if curl must first (down)load the map.
+                */
+               if (cls.signon == 1 && cl.loadcsqc) // waiting for CL_VM_Init() to be called
+                       return;
+
                // get the next message
                FS_Read(cls.demofile, &cl_message.cursize, 4);
                cl_message.cursize = LittleLong(cl_message.cursize);