foxygit / doom Log in
commit 4d8da3919b2c42a4459423eea0dbd309bdd5f195
Author:     ceski <56656010+ceski-1@users.noreply.github.com>
AuthorDate: Mon Oct 30 11:55:22 2023 -0700
Commit:     ceski <56656010+ceski-1@users.noreply.github.com>
CommitDate: Mon Oct 30 11:55:22 2023 -0700

    Simplify disabled sound check
---
 src/i_pcsound.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/i_pcsound.c b/src/i_pcsound.c
index 811ee43f..ba40d863 100644
--- a/src/i_pcsound.c
+++ b/src/i_pcsound.c
@@ -158,6 +158,7 @@ static boolean IsDisabledSound(sfxinfo_t *sfxinfo)
         "dmpain",
         "popain",
         "sawidl",
+        "rifle",
     };

     for (i=0; i<arrlen(disabled_sounds); ++i)
@@ -184,14 +185,7 @@ static int I_PCS_StartSound(sfxinfo_t *sfxinfo,
         return -1;
     }

-    if (gamemission == strife)
-    {
-        if (!strcmp(sfxinfo->name, "rifle"))
-        {
-            return -1;
-        }
-    }
-    else if (IsDisabledSound(sfxinfo))
+    if (IsDisabledSound(sfxinfo))
     {
         return -1;
     }