foxygit / doom Log in
commit 7f151567a240b61058c2703ef45ed70275ee9abc
Author:     James Haley <haleyjd@hotmail.com>
AuthorDate: Fri Feb 10 03:08:06 2012 +0000
Commit:     James Haley <haleyjd@hotmail.com>
CommitDate: Fri Feb 10 03:08:06 2012 +0000

    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
---
 src/strife/d_main.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/strife/d_main.c b/src/strife/d_main.c
index 3d423c97..0c66cac5 100644
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -1327,7 +1327,7 @@ static void D_DrawIntroSequence(void)
 //
 void D_IntroTick(void)
 {
-    int savedvol;
+    static boolean didsound = false; // haleyjd 20120209

     if(devparm)
         return;
@@ -1336,10 +1336,17 @@ void D_IntroTick(void)
     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();