]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
factor out menu_cmd sync
authorRudolf Polzer <divverent@xonotic.org>
Sun, 16 Oct 2011 12:21:42 +0000 (14:21 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 16 Oct 2011 12:21:42 +0000 (14:21 +0200)
qcsrc/menu/gamecommand.qc
qcsrc/menu/menu.qc
qcsrc/menu/menu.qh

index 7b8425c5bd04ada78d50d5c178a7325b09651be5..83ef53762c914ab5f5ca4cbd255547d14163f7a8 100644 (file)
@@ -74,9 +74,7 @@ void GameCommand(string theCommand)
 
        if(argv(0) == "sync")
        {
-               updateCompression();
-               updateConwidths();
-               loadAllCvars(main);
+               m_sync();
                return;
        }
 
index c8c3b62f4f61225c1493722248c19016eeaa15d5..f5c0f6da5d2b36fdce817b36a8e4d483272a8a7f 100644 (file)
@@ -18,6 +18,14 @@ float menuMouseMode;
 
 void SUB_Null() { }
 
+void m_sync()
+{
+       updateCompression();
+       updateConwidths();
+
+       loadAllCvars(main);
+}
+
 void m_init()
 {
        cvar_set("_menu_alpha", "0");
@@ -169,6 +177,8 @@ void m_init_delayed()
        menuShiftState = 0;
        menuMousePos = '0.5 0.5 0';
 
+       m_sync();
+
        if(Menu_Active)
                m_display(); // delayed menu display
 }
index e42595e58265e8ba3553a2a3fd698931f2b6a2c6..ab812437a00eba147f08570ca81e8541ea739249 100644 (file)
@@ -41,3 +41,5 @@ void SUB_Null();
 float preMenuInit(); // you have to define this for pre-menu initialization. Return 0 if initialization needs to be retried a frame later, 1 if it succeeded.
 void preMenuDraw(); // this is run before the menu is drawn. You may put some stuff there that has to be done every frame.
 void postMenuDraw(); // this is run just after the menu is drawn (or not). Useful to draw something over everything else.
+
+void m_sync();