]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - menu.c
cmd: Re-re-re-implement the cbuf. This time using the new generic linked list.
[xonotic/darkplaces.git] / menu.c
diff --git a/menu.c b/menu.c
index 5cad78b7f1f03214b4373ecfe0db9a62e929808f..6308f480b6ea93675234288520fcd5d8539cc402 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -1284,18 +1284,18 @@ static int              setup_oldrate;
 
 #define        NUM_SETUP_CMDS  5
 
-extern cvar_t topcolor;
-extern cvar_t bottomcolor;
+extern cvar_t cl_topcolor;
+extern cvar_t cl_bottomcolor;
 
 void M_Menu_Setup_f(cmd_state_t *cmd)
 {
        key_dest = key_menu;
        m_state = m_setup;
        m_entersound = true;
-       strlcpy(setup_myname, name.string, sizeof(setup_myname));
-       setup_top = setup_oldtop = topcolor.integer;
-       setup_bottom = setup_oldbottom = bottomcolor.integer;
-       setup_rate = rate.integer;
+       strlcpy(setup_myname, cl_name.string, sizeof(setup_myname));
+       setup_top = setup_oldtop = cl_topcolor.integer;
+       setup_bottom = setup_oldbottom = cl_bottomcolor.integer;
+       setup_rate = cl_rate.integer;
 }
 
 static int menuplyr_width, menuplyr_height, menuplyr_top, menuplyr_bottom, menuplyr_load;
@@ -1496,7 +1496,7 @@ forward:
                        goto forward;
 
                // setup_cursor == 4 (Accept changes)
-               if (strcmp(name.string, setup_myname) != 0)
+               if (strcmp(cl_name.string, setup_myname) != 0)
                        Cbuf_AddText(cmd, va(vabuf, sizeof(vabuf), "name \"%s\"\n", setup_myname) );
                if (setup_top != setup_oldtop || setup_bottom != setup_oldbottom)
                        Cbuf_AddText(cmd, va(vabuf, sizeof(vabuf), "color %i %i\n", setup_top, setup_bottom) );
@@ -5233,9 +5233,11 @@ void MVM_error_cmd(const char *format, ...)
        MR_SetRouting (true);
 
        // reset the active scene, too (to be on the safe side ;))
-   R_SelectScene( RST_CLIENT );
+       R_SelectScene( RST_CLIENT );
 
-       Host_AbortCurrentFrame();
+       // Let video start at least
+       if(host.state != host_init)
+               Host_AbortCurrentFrame();
 }
 
 static void MVM_begin_increase_edicts(prvm_prog_t *prog)