Blood: Fix enemy death sfx getting cut and fix cultist sfx not getting cut on death #854
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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