]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_demo.c
cmd: Dynamically allocate the command interpreters
[xonotic/darkplaces.git] / cl_demo.c
index 6858aea619833e8596c988e24e3e5d4b780049e1..a3be2148d09709c6ab33208eec19313ea9e0f585 100644 (file)
--- a/cl_demo.c
+++ b/cl_demo.c
@@ -67,7 +67,7 @@ void CL_NextDemo (void)
        }
 
        dpsnprintf (str, sizeof(str), "playdemo %s\n", cls.demos[cls.demonum]);
-       Cbuf_InsertText(&cmd_client, str);
+       Cbuf_InsertText(cmd_client, str);
        cls.demonum++;
 }
 
@@ -274,7 +274,7 @@ void CL_ReadDemoMessage(void)
                        CL_ParseServerMessage();
 
                        if (cls.signon != SIGNONS)
-                               Cbuf_Execute((&cmd_client)->cbuf); // immediately execute svc_stufftext if in the demo before connect!
+                               Cbuf_Execute((cmd_client)->cbuf); // immediately execute svc_stufftext if in the demo before connect!
 
                        // In case the demo contains a "svc_disconnect" message
                        if (!cls.demoplayback)
@@ -531,7 +531,7 @@ static void CL_FinishTimeDemo (void)
                        if(atoi(sys.argv[i + 1]) > benchmark_runs)
                        {
                                // restart the benchmark
-                               Cbuf_AddText(&cmd_client, va(vabuf, sizeof(vabuf), "timedemo %s\n", cls.demoname));
+                               Cbuf_AddText(cmd_client, va(vabuf, sizeof(vabuf), "timedemo %s\n", cls.demoname));
                                // cannot execute here
                        }
                        else