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

[MIRROR] Fixes hearing messages from speakers on another z level (515 fix) #799

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Skyrat: Skyrat-SS13/Skyrat-tg#25217
Original PR: tgstation/tgstation#79888

515 changed get_dist to return inf when either end is on another z level, instead of just the maximum range. /mob/living/Hear early returns when the speaker is too far away to hear. Previously we would get around this by passing in INFINITY as the range for the message, but the INFINITY define is just a very large number instead of real infinity which is what byond gives back for get_dist.

I also improved the unit test a little while debugging this.

… fix) [MDB IGNORE] (#25217)

* Fixes hearing messages from speakers on another z level (515 fix) (#79888)

515 changed get_dist to return inf when either end is on another z
level, instead of just the maximum range. `/mob/living/Hear` early
returns when the speaker is too far away to hear. Previously we would
get around this by passing in INFINITY as the range for the message, but
the INFINITY define is just a very large number instead of real infinity
which is what byond gives back for get_dist.

I also improved the unit test a little while debugging this.

* Fixes hearing messages from speakers on another z level (515 fix)

---------

Co-authored-by: Emmett Gaines <[email protected]>
@Iajret Iajret merged commit b2b96e5 into master Nov 24, 2023
24 checks passed
@Iajret Iajret deleted the upstream-mirror-25217 branch November 24, 2023 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants