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

Fix player sounds being cut off by item pickups in vanilla complevels #486

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

jackrjli
Copy link
Contributor

This is a different fix to the same problem that coelckers/prboom-plus#330 was trying to solve.

When picking up an item, the vanilla code calls S_StartSound with a NULL origin, so the pickup sound does not cut off player sounds, which use player->mo as the origin. Boom changes the origin to the player and makes weapon pickups audible to other players, but also changes s_sound.c to distinguish between pickup sounds and non-pickup sounds so they don't cut each other off. comp_sound disables the pickup sound logic in s_sound.c, but did not change the sound origin back to NULL until this commit.

When picking up an item, the vanilla code calls S_StartSound with a NULL origin, so the pickup sound does not cut off player sounds, which use player->mo as the origin. Boom changes the origin to the player and makes weapon pickups audible to other players, but also changes s_sound.c to distinguish between pickup sounds and non-pickup sounds so they don't cut each other off. comp_sound disables the pickup sound logic in s_sound.c, but did not change the sound origin back to NULL until this commit.
Copy link
Owner

@kraflab kraflab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for the explanation and the clean fix 👍

@kraflab kraflab merged commit 356e3d7 into kraflab:master Mar 21, 2024
3 of 4 checks passed
@jackrjli jackrjli deleted the sound-cutoff branch March 21, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants