From a9348dc93db89a4390063ab00a6b0a0f16c36599 Mon Sep 17 00:00:00 2001 From: tmyqlfpir <80724828+tmyqlfpir@users.noreply.github.com> Date: Fri, 25 Oct 2024 12:27:01 +1000 Subject: [PATCH] Blood: Assign unique channel to cultist death cry (#857) --- source/blood/src/actor.cpp | 7 ++++--- source/blood/src/sfx.cpp | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/blood/src/actor.cpp b/source/blood/src/actor.cpp index 25f1f15225..68afe712fe 100644 --- a/source/blood/src/actor.cpp +++ b/source/blood/src/actor.cpp @@ -3137,9 +3137,10 @@ void actKillDude(int nKillerSprite, spritetype *pSprite, DAMAGE_TYPE damageType, case kDudeCultistShotgun: case kDudeCultistTesla: case kDudeCultistTNT: - if (!VanillaMode()) // mute all cultist alerts sfx on death - sfxKill3DSound(pSprite, kMaxSprites+pSprite->index, -1); // cultist alert sfx use kMaxSprites+sprite index as channel - sfxPlay3DSound(pSprite, 1018+Random(2), -1, 0); + if (!VanillaMode()) // trigger cultist death scream sfx over cultist alerts sfx channel + sfxPlay3DSound(pSprite, 1018+Random(2), kMaxSprites+pSprite->index, 1|8); // cultist alert sfx use kMaxSprites+sprite index as channel + else + sfxPlay3DSound(pSprite, 1018+Random(2), -1, 0); if (nSeq == 3) seqSpawn(dudeInfo[nType].seqStartID+nSeq, 3, nXSprite, nDudeToGibClient2); else diff --git a/source/blood/src/sfx.cpp b/source/blood/src/sfx.cpp index 37f7d89523..a7e5653462 100644 --- a/source/blood/src/sfx.cpp +++ b/source/blood/src/sfx.cpp @@ -195,7 +195,7 @@ void sfxPlay3DSound(spritetype *pSprite, int soundId, int chanId, int nFlags) return; pBonkle = BonkleCache[nBonkles++]; } - pBonkle->pSndSpr = pSprite; + pBonkle->pSndSpr = !(nFlags & 8) ? pSprite : NULL; pBonkle->chanId = chanId; } else @@ -306,7 +306,7 @@ void sfxPlay3DSoundCP(spritetype* pSprite, int soundId, int chanId, int nFlags, return; pBonkle = BonkleCache[nBonkles++]; } - pBonkle->pSndSpr = pSprite; + pBonkle->pSndSpr = !(nFlags & 8) ? pSprite : NULL; pBonkle->chanId = chanId; } else