]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/menu/voret/slider_decibels.c
Tweak the system sound to use 0.5 as the default volume, instead of 1.0. This allows...
[voretournament/voretournament.git] / data / qcsrc / menu / voret / slider_decibels.c
index c699588631cd084fa549a36192d5db282841714d..e455b81a625e749d43499431ed1d46aff2dcd1d9 100644 (file)
@@ -41,7 +41,12 @@ void saveCvarsVoretDecibelsSlider(entity me)
        if(me.value < -33)\r
                cvar_set(me.cvarName, "0");\r
        else\r
        if(me.value < -33)\r
                cvar_set(me.cvarName, "0");\r
        else\r
-               cvar_set(me.cvarName, ftos(pow(10, me.value / 10)));\r
+       {\r
+               if(me.cvarName == "menu_bgmvolume")\r
+                       cvar_set(me.cvarName, ftos(pow(10, me.value / 10) / 2)); // due to system settings, music volume must be twice as low\r
+               else\r
+                       cvar_set(me.cvarName, ftos(pow(10, me.value / 10)));\r
+       }\r
 }\r
 \r
 string valueToTextVoretDecibelsSlider(entity me, float v)\r
 }\r
 \r
 string valueToTextVoretDecibelsSlider(entity me, float v)\r