]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/View.qc
Use an even uglier hack in the menu, until I can figure out the right maths. Sometime...
[voretournament/voretournament.git] / data / qcsrc / client / View.qc
index f7a268e1bc66d72fd5afbd08d073f474a98105ae..e4d4aa3d195eb952d6a9059fad6758edc580088d 100644 (file)
@@ -735,6 +735,9 @@ void CSQC_UpdateView(float w, float h)
                        cvar_set("volume", ftos(volume_modify_1));\r
                        cvar_set("bgmvolume", ftos(volume_modify_2));\r
                        // TODO: Setting the "volume" cvar is a bad way to go, and modifies the menu slider! We need a better way\r
+\r
+                       if(!cvar("menu_block_sound_sliders"))\r
+                               cvar_set("menu_block_sound_sliders", "1"); // ugly hack to block the sound sliders\r
                }\r
                else if not(getstati(STAT_VORE_EATEN))\r
                {\r
@@ -742,8 +745,13 @@ void CSQC_UpdateView(float w, float h)
                        // so if we change the volume settings, update the initial volume\r
                        volume_modify_default_1 = cvar("volume");\r
                        volume_modify_default_2 = cvar("bgmvolume");\r
+\r
+                       if(cvar("menu_block_sound_sliders"))\r
+                               cvar_set("menu_block_sound_sliders", "0"); // ugly hack to block the sound sliders\r
                }\r
        }\r
+       else if(cvar("menu_block_sound_sliders"))\r
+               cvar_set("menu_block_sound_sliders", "0"); // ugly hack to block the sound sliders\r
 \r
        // Draw the mouse cursor\r
        // NOTE: drawpic must happen after R_RenderScene for some reason\r