Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blood: Fix enemy death sfx getting cut and fix cultist sfx not getting cut on death #854

Merged
merged 6 commits into from
Oct 23, 2024

Conversation

tmyqlfpir
Copy link
Contributor

@tmyqlfpir tmyqlfpir commented Oct 14, 2024

This PR fixes a common issue of channels being cut out upon an enemy's death, and resolves an original game bug of cultist alerts continuing to play on death.

When an enemy is killed by a hitscan weapon such as the shotgun or tommy gun, it'll spawn a spurt of blood that has a random chance of triggering a splattering sfx upon hitting the ground - and cutting off the still ongoing enemy death sfx. This PR will set the sound effect trigger to only play if the channel is available, instead of cutting off the voice.

For cultists, when they are killed at point blank range with the shotgun, it'll trigger the activate callout sfx, then the death sfx in the same tick. This PR resolves this by setting all cultists to use their own unique channel slot for callouts, so they are cut off upon dying or getting hurt.

Fixes #804

@tmyqlfpir tmyqlfpir force-pushed the fix-screams branch 5 times, most recently from 53d478a to 27bf005 Compare October 21, 2024 18:20
@tmyqlfpir tmyqlfpir marked this pull request as draft October 21, 2024 21:50
@tmyqlfpir tmyqlfpir marked this pull request as ready for review October 21, 2024 22:04
@tmyqlfpir tmyqlfpir marked this pull request as draft October 21, 2024 22:44
@tmyqlfpir tmyqlfpir marked this pull request as ready for review October 21, 2024 23:07
@tmyqlfpir tmyqlfpir changed the title Blood: Fix enemy death sfx being cut off by splatter gib sfx Blood: Fix enemy death sfx getting cut and fix cultist sfx not getting cut on death Oct 21, 2024
@Hendricks266
Copy link
Collaborator

Looks great. Only comments: I would prefer if Blood: Tweak aiActivateDude() nChannel variable were squashed into Blood: Mute cultist alert calls on death, rather than implementing something one way and changing it later in the same patchset. Also, should the literal 16384 used for the definition of nChannel be some macro constant? I'm guessing MAXSPRITES.

@tmyqlfpir
Copy link
Contributor Author

tmyqlfpir commented Oct 22, 2024

Sure, I'll do that, and comment about the unique magic number use for the nChannel variable.

@tmyqlfpir tmyqlfpir force-pushed the fix-screams branch 3 times, most recently from 18b1179 to 1eac3f3 Compare October 22, 2024 04:21
@Hendricks266 Hendricks266 merged commit 2a1ffe3 into nukeykt:master Oct 23, 2024
10 checks passed
@tmyqlfpir tmyqlfpir deleted the fix-screams branch October 23, 2024 00:29
@Hendricks266 Hendricks266 added the original game bug A glitch present in the original game. May be worth fixing outside of vanilla mode. label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
original game bug A glitch present in the original game. May be worth fixing outside of vanilla mode.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NBlood] Enemy death sounds randomly cut out
2 participants