foxygit / doom Log in
commit 9c50831d11681d00e2dfc5d54ddb3e4646e71d91
Author:     ceski <56656010+ceski-1@users.noreply.github.com>
AuthorDate: Mon Oct 30 12:24:34 2023 -0700
Commit:     ceski <56656010+ceski-1@users.noreply.github.com>
CommitDate: Mon Oct 30 12:24:34 2023 -0700

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

diff --git a/src/i_pcsound.c b/src/i_pcsound.c
index ba40d863..c3ec6280 100644
--- a/src/i_pcsound.c
+++ b/src/i_pcsound.c
@@ -245,15 +245,11 @@ static int I_PCS_GetSfxLumpNum(sfxinfo_t* sfx)
 {
     char namebuf[9];

-    if (gamemission == doom)
-    {
-        M_snprintf(namebuf, sizeof(namebuf), "dp%s", DEH_String(sfx->name));
-    }
-    else if (gamemission == strife)
+    if (gamemission == doom || gamemission == strife)
     {
         M_snprintf(namebuf, sizeof(namebuf), "dp%s", DEH_String(sfx->name));

-        if (W_CheckNumForName(namebuf) == -1)
+        if (gamemission == strife && W_CheckNumForName(namebuf) == -1)
         {
             // Missing sounds replaced with DPRIFLE.
             M_snprintf(namebuf, sizeof(namebuf), "dp%s", DEH_String("rifle"));