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

Sound Environment update #6620

Merged
merged 3 commits into from
Jul 6, 2024
Merged

Conversation

Doubleumc
Copy link
Contributor

@Doubleumc Doubleumc commented Jul 5, 2024

About the pull request

Changes to how a client's sound environment and echo is handled:
https://www.byond.com/docs/ref/#/sound/var/environment
https://www.byond.com/docs/ref/#/sound/var/echo

A client's soundOutput now has sole control over environment and echo.
The environment is updated when the mob moves into a different area, or if the mob's environment override is set.
The echo is used to enable or disable the environmental reverb per-sound.

Explain why it's good for the game

Issue: an environment applies to all sounds for that client, current and future, until another one is set. It applies to in-world sounds as well as, say, admin pings.

Solution: since an echo is applied per-sound, by adjusting the echo's Room & RoomHF fields the environmental effects can be enabled or disabled (more accurately, made so quiet as to be inaudible). This is set to off by default, and is only enabled for positional sounds. Admin pings are safe.

Idea from here: tgstation/tgstation#55333

Testing Photographs and Procedure

Boots without issue. Sound environments change at appropriate points. Sound environments effect only positional sounds.

Changelog

🆑
code: environmental reverb applies more reliably and only to positional sounds
/:cl:

@Doubleumc Doubleumc requested a review from fira as a code owner July 5, 2024 03:26
@github-actions github-actions bot added the Code Improvement Make the code longer label Jul 5, 2024
documented the echo reverb trick a little better
@harryob harryob added this pull request to the merge queue Jul 6, 2024
Merged via the queue into cmss13-devs:master with commit be57509 Jul 6, 2024
27 checks passed
cm13-github added a commit that referenced this pull request Jul 6, 2024
@Doubleumc Doubleumc deleted the sound-environment branch July 6, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Improvement Make the code longer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants