]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_demo.c
prvm: Initial experimental implementation of support for 32-bit progs offsets
[xonotic/darkplaces.git] / cl_demo.c
index 1d14f718c1bfc11c981ed0ddc25b3ea24a268b11..5acbaa4eec825a211ded2e1b1da4a063cf7007b6 100644 (file)
--- a/cl_demo.c
+++ b/cl_demo.c
@@ -275,7 +275,7 @@ void CL_ReadDemoMessage(void)
                        CL_ParseServerMessage();
 
                        if (cls.signon != SIGNONS)
-                               Cbuf_Execute(&cmd_client); // 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)
@@ -389,7 +389,7 @@ void CL_Record_f(cmd_state_t *cmd)
        cls.demofile = FS_OpenRealFile(name, "wb", false);
        if (!cls.demofile)
        {
-               Con_Error("ERROR: couldn't open.\n");
+               Con_Print(CON_ERROR "ERROR: couldn't open.\n");
                return;
        }
        strlcpy(cls.demoname, name, sizeof(cls.demoname));
@@ -429,7 +429,7 @@ void CL_PlayDemo_f(cmd_state_t *cmd)
        f = FS_OpenVirtualFile(name, false);
        if (!f)
        {
-               Con_Errorf("ERROR: couldn't open %s.\n", name);
+               Con_Printf(CON_ERROR "ERROR: couldn't open %s.\n", name);
                cls.demonum = -1;               // stop demo loop
                return;
        }
@@ -499,7 +499,7 @@ static void CL_FinishTimeDemo (void)
        static int benchmark_runs = 0;
        char vabuf[1024];
 
-       cls.timedemo = false;
+       cls.timedemo = host.restless = false;
 
        frames = cls.td_frames;
        time = host.realtime - cls.td_starttime;
@@ -614,7 +614,7 @@ void CL_TimeDemo_f(cmd_state_t *cmd)
        key_consoleactive = 0;
        scr_con_current = 0;
 
-       cls.timedemo = true;
+       cls.timedemo = host.restless = true;
        cls.td_frames = -2;             // skip the first frame
        cls.demonum = -1;               // stop demo loop
 }
@@ -721,4 +721,4 @@ void CL_Demo_Init(void)
        Cvar_RegisterVariable (&cl_autodemo);
        Cvar_RegisterVariable (&cl_autodemo_nameformat);
        Cvar_RegisterVariable (&cl_autodemo_delete);
-}
\ No newline at end of file
+}