Skip to content

Commit

Permalink
Blood: Assign unique channel to cultist death cry (#857)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmyqlfpir authored Oct 25, 2024
1 parent 1456e5e commit a9348dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions source/blood/src/actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions source/blood/src/sfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a9348dc

Please sign in to comment.