]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
add menu item for new style (dB based) sound attenuation, and make it default
authorRudolf Polzer <divverent@xonotic.org>
Sun, 9 Oct 2011 13:42:31 +0000 (15:42 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 9 Oct 2011 13:42:31 +0000 (15:42 +0200)
defaultXonotic.cfg
qcsrc/menu/xonotic/dialog_settings_audio.c

index 7f18fa9c8fbdffab306afbe49c1c2d3fb62aa86f..645b53a80361a196cbeb2826c138bd24cd44d7c6 100644 (file)
@@ -2160,6 +2160,10 @@ set g_playerstats_debug 0 "when 1, player stats are dumped to the console too"
 
 // create this cvar in case the engine did not
 set snd_soundradius 1200
+seta menu_snd_attenuation_method 1 "Use exponential instead of linear falloff for sound attenuation"
+alias snd_attenuation_method_0 "set menu_snd_attenuation_method 0; set snd_attenuation_exponent 1; set snd_attenuation_decibel 0"
+alias snd_attenuation_method_1 "set menu_snd_attenuation_method 1; set snd_attenuation_exponent 0; set snd_attenuation_decibel 10"
+snd_attenuation_method_1
 
 // declare the channels we use
 seta snd_channel8volume 1 "QuakeC controlled background music volume"
index f85c2877cc6f8c82e44be48ed91582eb634eea20..bf3406142c4c91f188a09f2c98e66267adfcdb80 100644 (file)
@@ -127,6 +127,8 @@ void XonoticAudioSettingsTab_fill(entity me)
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "snd_spatialization_control", _("Headphone friendly mode")));
                setDependent(e, "snd_channels", 1.5, 0.5);
        me.TR(me);
+       me.TR(me);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "menu_snd_attenuation_method", _("New style sound attenuation")));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Spatial voices:")));
                me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "0", ZCTX(_("VOCS^None"))));
@@ -170,6 +172,6 @@ void XonoticAudioSettingsTab_fill(entity me)
                me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "menu_sounds", _("Menu sounds")));
 
        me.gotoRC(me, me.rows - 1, 0);
-               me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "snd_restart; sendcvar cl_hitsound; sendcvar cl_autotaunt; sendcvar cl_voice_directional; sendcvar cl_voice_directional_taunt_attenuation", COMMANDBUTTON_APPLY));
+               me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "snd_restart; snd_attenuation_method_$menu_snd_attenuation_method; sendcvar cl_hitsound; sendcvar cl_autotaunt; sendcvar cl_voice_directional; sendcvar cl_voice_directional_taunt_attenuation", COMMANDBUTTON_APPLY));
 }
 #endif