]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
also apply volume.value to ambient sounds (is this really right?)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 31 Jan 2011 06:05:54 +0000 (06:05 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 31 Jan 2011 06:05:54 +0000 (06:05 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10789 d7cf8633-e32d-0410-b094-e92efae38249

snd_main.c

index 391a9f9a277cc82ff0059eac09dd23d7e293bf81..fac45a4f6a23a4ce08e2aa8cdc8a0a5eea600bba 100644 (file)
@@ -1889,15 +1889,15 @@ void S_UpdateAmbientSounds (void)
 
                if (snd_spatialization_prologic.integer != 0)
                {
-                       chan->listener_volume[0] = (int)bound(0, chan->master_vol * ambient_level.value * mastervolume.value * snd_speakerlayout.listeners[0].ambientvolume * sqrt(0.5), 65536);
-                       chan->listener_volume[1] = (int)bound(0, chan->master_vol * ambient_level.value * mastervolume.value * snd_speakerlayout.listeners[1].ambientvolume * sqrt(0.5), 65536);
+                       chan->listener_volume[0] = (int)bound(0, chan->master_vol * ambient_level.value * volume.value * mastervolume.value * snd_speakerlayout.listeners[0].ambientvolume * sqrt(0.5), 65536);
+                       chan->listener_volume[1] = (int)bound(0, chan->master_vol * ambient_level.value * volume.value * mastervolume.value * snd_speakerlayout.listeners[1].ambientvolume * sqrt(0.5), 65536);
                        for (i = 2;i < SND_LISTENERS;i++)
                                chan->listener_volume[i] = 0;
                }
                else
                {
                        for (i = 0;i < SND_LISTENERS;i++)
-                               chan->listener_volume[i] = (int)bound(0, chan->master_vol * ambient_level.value * mastervolume.value * snd_speakerlayout.listeners[i].ambientvolume, 65536);
+                               chan->listener_volume[i] = (int)bound(0, chan->master_vol * ambient_level.value * volume.value * mastervolume.value * snd_speakerlayout.listeners[i].ambientvolume, 65536);
                }
        }
 }