From: MirceaKitsune Date: Wed, 13 Jul 2011 21:58:59 +0000 (+0300) Subject: Tweak the system sound to use 0.5 as the default volume, instead of 1.0. This allows... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3d83bdae969713274b1ed57a599293e31fcc8789;p=voretournament%2Fvoretournament.git Tweak the system sound to use 0.5 as the default volume, instead of 1.0. This allows us to work around the 0-to-1 limit range in sound() (darkplaces cannot read a volume greater than 1), and the sounds of larger players will now be boosted based on player size. --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index c66b4f3d..213f9fd1 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1614,10 +1614,11 @@ set g_healthsize_min 50 "Player size may not drop below this amount of health" set g_healthsize_max 150 "Player size may not grow past this amount of health" // part of an ugly hack for the menu audio sliders to work with the cutsound feature -seta menu_volume 0.5 -seta menu_bgmvolume 1 +seta menu_volume 1 +seta menu_bgmvolume 0.5 set volume $menu_volume set bgmvolume $menu_bgmvolume +set mastervolume 1.4 set sv_weaponstats_damagefile "" "when set to a file name, per-weapon damage stats get written to that file" set sv_weaponstats_killfile "" "when set to a file name, per-weapon kill stats get written to that file" diff --git a/data/qcsrc/common/constants.qh b/data/qcsrc/common/constants.qh index 65f48568..44f19165 100644 --- a/data/qcsrc/common/constants.qh +++ b/data/qcsrc/common/constants.qh @@ -397,8 +397,8 @@ float ATTN_IDLE = 2; float ATTN_STATIC = 3; float ATTN_MAX = 3.984375; -#define VOL_BASE 0.7 -#define VOL_BASEVOICE 1.0 +#define VOL_BASE 0.3 +#define VOL_BASEVOICE 0.5 // this sets sounds and other properties of the projectiles in csqc float PROJECTILE_EXAMPLE = 1; // VoreTournament doesn't use any projectiles by default, so this example will guide us if any will be added in the future diff --git a/data/qcsrc/menu/voret/slider_decibels.c b/data/qcsrc/menu/voret/slider_decibels.c index c6995886..e455b81a 100644 --- a/data/qcsrc/menu/voret/slider_decibels.c +++ b/data/qcsrc/menu/voret/slider_decibels.c @@ -41,7 +41,12 @@ void saveCvarsVoretDecibelsSlider(entity me) if(me.value < -33) cvar_set(me.cvarName, "0"); else - cvar_set(me.cvarName, ftos(pow(10, me.value / 10))); + { + if(me.cvarName == "menu_bgmvolume") + cvar_set(me.cvarName, ftos(pow(10, me.value / 10) / 2)); // due to system settings, music volume must be twice as low + else + cvar_set(me.cvarName, ftos(pow(10, me.value / 10))); + } } string valueToTextVoretDecibelsSlider(entity me, float v)