shithub: choc

Download patch

ref: 7f151567a240b61058c2703ef45ed70275ee9abc
parent: 4012f2369314d58cc5f567ed10446ef4c17bfab8
author: James Haley <[email protected]>
date: Thu Feb 9 22:08:06 EST 2012

While I'm screwing with intro related stuff, I may as well replace the
S_SetSfxVolume hack with a more appropriate fix.

Subversion-branch: /branches/v2-branch
Subversion-revision: 2501

--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -1327,7 +1327,7 @@
 //
 void D_IntroTick(void)
 {
-    int savedvol;
+    static boolean didsound = false; // haleyjd 20120209
     
     if(devparm)
         return;
@@ -1336,10 +1336,17 @@
     if(introprogress >= MAXINTROPROGRESS)
     {
         D_IntroBackground(); // haleyjd: clear the bg anyway
-        savedvol = sfxVolume;
-        S_SetSfxVolume(4*8); // haleyjd 20110924: temporary hack...
-        S_StartSound(NULL, sfx_psdtha);
-        S_SetSfxVolume(savedvol*8);
+        
+        // haleyjd 20120209: This isn't 100% true to vanilla because vanilla
+        // would play this sound a half-dozen times. BUT, in vanilla, for 
+        // whatever reason, under DMX, playing the same sound multiple times
+        // doesn't add up violently like it does under SDL_mixer. This means
+        // that without this one-time limitation, the sound is far too loud.
+        if(!didsound)
+        {
+            S_StartSound(NULL, sfx_psdtha);
+            didsound = true;
+        }
     }
     else
         D_DrawIntroSequence();