]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - menu.c
updated with new default value of con_closeontoggleconsole
[xonotic/darkplaces.git] / menu.c
diff --git a/menu.c b/menu.c
index e9597350fafabec523c47ea31fc3fb1a8e17a9a0..f6acea74b6efeeac5cb66f9eb952c924e39c4b94 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -28,6 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #define TYPE_GAME 2
 #define TYPE_BOTH 3
 
+static cvar_t forceqmenu = { 0, "forceqmenu", "0", "enables the quake menu instead of the quakec menu.dat (if present)" };
+
 static int NehGameType;
 
 enum m_state_e m_state;
@@ -408,7 +410,7 @@ void M_Menu_Main_f (void)
                MAIN_ITEMS = 5;
 
        // check if the game data is missing and use a different main menu if so
-       m_missingdata = Draw_CachePic (s, true)->tex == r_texture_notexture;
+       m_missingdata = !forceqmenu.integer && Draw_CachePic (s, true)->tex == r_texture_notexture;
        if (m_missingdata)
                MAIN_ITEMS = 2;
 
@@ -4958,6 +4960,9 @@ void MP_Init (void)
 
        PRVM_LoadProgs(M_PROG_FILENAME, m_numrequiredfunc, m_required_func, 0, NULL, 0, NULL);
 
+       // note: OP_STATE is not supported by menu qc, we don't even try to detect
+       // it here
+
 #ifdef NG_MENU
        m_displayed = false;
 #endif
@@ -4976,8 +4981,6 @@ void MP_Restart(void)
 //============================================================================
 // Menu router
 
-static cvar_t forceqmenu = { 0, "forceqmenu", "0", "enables the quake menu instead of the quakec menu.dat (if present)" };
-
 void (*MR_KeyEvent) (int key, char ascii, qboolean downevent);
 void (*MR_Draw) (void);
 void (*MR_ToggleMenu_f) (void);
@@ -5042,7 +5045,7 @@ void MR_Init_Commands(void)
        Cvar_RegisterVariable (&forceqmenu);
        Cvar_RegisterVariable (&menu_options_colorcontrol_correctionvalue);
        if (gamemode == GAME_NETHERWORLD)
-               Cmd_AddCommand ("menu_fallback", MP_Fallback, "switch to engine menu (unload menu.dat)"); //Force to old-style menu
+               Cmd_AddCommand ("menu_fallback", MP_Fallback, "switch to engine menu (unload menu.dat)");
        Cmd_AddCommand ("menu_restart",MR_Restart, "restart menu system (reloads menu.dat");
        Cmd_AddCommand ("togglemenu", Call_MR_ToggleMenu_f, "opens or closes menu");
 }