]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/menu.qc
Merge branch 'Spike29/languages' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / menu.qc
index 7796cbccaa1de271031755ca8f1d7a6316aaa647..8bff8c4c67eec298b31f2ea589872a23575e6069 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "xonotic/util.qh"
 
+#include <common/checkextension.qh>
 #include <common/items/_mod.qh>
 #include <common/weapons/_all.qh>
 #include <common/mapinfo.qh>
@@ -76,6 +77,8 @@ void m_init()
                LOG_TRACEF("^4MQC Build information: ^1%s", WATERMARK);
 #endif
 
+       CheckEngineExtensions();
+
        // list all game dirs (TEST)
        if (cvar("developer") > 0)
        {
@@ -917,6 +920,10 @@ void m_toggle(int mode)
        if (Menu_Active)
        {
                if (mode == 1) return;
+               // when togglemenu is called without arguments (mode is -1)
+               // the menu is closed only when connected
+               if (mode == -1 && !(gamestatus & GAME_CONNECTED)) return;
+               // togglemenu 0 always closes the menu
                m_hide();
        }
        else