]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix ambient sounds in prologic
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 23 Sep 2010 04:40:22 +0000 (04:40 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 23 Sep 2010 04:40:22 +0000 (04:40 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10481 d7cf8633-e32d-0410-b094-e92efae38249

snd_main.c

index 685316ca63a6356cd4e5bb4125b64cbc2b898c8f..98fa0d1540e257f760d71ddd2a68359fa2a2387d 100644 (file)
@@ -1371,8 +1371,11 @@ void SND_Spatialize(channel_t *ch, qboolean isstatic)
                ch->prologic_invert = 1;
                if (snd_spatialization_prologic.integer != 0)
                {
-                       vol = mastervol * snd_speakerlayout.listeners[i].ambientvolume * sqrt(0.5);
-                       ch->listener_volume[0] = ch->listener_volume[1] = (int)bound(0, vol, 255);
+                       for (i = 0;i < 2;i++)
+                       {
+                               vol = mastervol * snd_speakerlayout.listeners[i].ambientvolume * sqrt(0.5);
+                               ch->listener_volume[i] = (int)bound(0, vol, 255);
+                       }
                        for (i = 2;i < SND_LISTENERS;i++)
                                ch->listener_volume[i] = 0;
                }