From: MirceaKitsune Date: Thu, 14 Jul 2011 19:28:02 +0000 (+0300) Subject: Simplify menu code a little X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ea1941e03e2571cf08f005985c48b1f6c50b5e18;p=voretournament%2Fvoretournament.git Simplify menu code a little --- 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)