]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/menu.qc
restart menu when having turned "" to "en" to make menu.dat.en.po apply
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / menu.qc
index c097f99b963833366276363fffc9aebebcf8d3c5..c46069a3c436297cdaeb1ff8f23ba5d9a28df171 100644 (file)
@@ -29,7 +29,15 @@ void m_sync()
 void m_init()
 {
        cvar_set("_menu_alpha", "0");
-       prvm_language = strzone(cvar_string("prvm_language"));
+       prvm_language = cvar_string("prvm_language");
+       if(prvm_language == "")
+       {
+               prvm_language = "en";
+               cvar_set("prvm_language", prvm_language);
+               localcmd("\nmenu_restart; togglemenu\n");
+       }
+       prvm_language = strzone(prvm_language);
+       cvar_set("_menu_prvm_language", prvm_language);
 
        check_unacceptable_compiler_bugs();
 
@@ -54,6 +62,13 @@ void m_init()
        // needs to be done so early because of the constants they create
        RegisterWeapons();
        RegisterGametypes();
+
+       float ddsload = cvar("r_texture_dds_load");
+       float texcomp = cvar("gl_texturecompression");
+       updateCompression();
+       if(ddsload != cvar("r_texture_dds_load") || texcomp != cvar("gl_texturecompression"))
+               localcmd("\nr_restart\n");
+       initConwidths();
 }
 
 float MENU_ASPECT = 1.25; // 1280x1024