From ea1941e03e2571cf08f005985c48b1f6c50b5e18 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Thu, 14 Jul 2011 22:28:02 +0300 Subject: [PATCH] Simplify menu code a little --- data/qcsrc/menu/voret/slider_decibels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/qcsrc/menu/voret/slider_decibels.c b/data/qcsrc/menu/voret/slider_decibels.c index 4afd27ff..c32409ea 100644 --- a/data/qcsrc/menu/voret/slider_decibels.c +++ b/data/qcsrc/menu/voret/slider_decibels.c @@ -31,9 +31,9 @@ void loadCvarsVoretDecibelsSlider(entity me) else { if(me.cvarName == "menu_bgmvolume") - me.value = 0.1 * floor(0.5 + 10.0 * log10(cvar(me.cvarName) * 2) * 10); // due to system settings, overall music volume must be twice as low + me.value = 0.1 * floor(0.5 + 10.0 * log10(v * 2) * 10); // due to system settings, overall music volume must be twice as low else - me.value = 0.1 * floor(0.5 + 10.0 * log10(cvar(me.cvarName)) * 10); + me.value = 0.1 * floor(0.5 + 10.0 * log10(v) * 10); } } void saveCvarsVoretDecibelsSlider(entity me) -- 2.39.2