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

Fixes a runtime with SecurEye and updates bodycamera descriptions #4103

Conversation

zimon9
Copy link
Contributor

@zimon9 zimon9 commented Jan 29, 2025

About The Pull Request

This PR should fix a runtime that had been popping up with bodycameras during their testmerges. It should also fix part of the description for them that I'd erroneously made bold.

Why It's Good For The Game

Runtimes are not good, and the description was a little confusing in what words were made bold. A single missing character causes untold havoc yet again.

Changelog

🆑
fix: fixed securEye runtime
fix: fixed bodycamera description typo
/:cl:

@github-actions github-actions bot added the Code change Watch something violently break. label Jan 29, 2025
Comment on lines +176 to +180
if(!active_camera)
show_camera_static()
return
else if (active_camera.loc == null)
show_camera_static()
Copy link
Member

Choose a reason for hiding this comment

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

any reason not to slap an OR here instead?

Copy link
Contributor Author

@zimon9 zimon9 Feb 7, 2025

Choose a reason for hiding this comment

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

The reason it's staggered like this is because if no active camera is selected, the reference would be set to null, and this was causing runtimes when active_camera was null (because null.loc would throw a runtime)

This should check if active_camera is not null first, and then evaluate if the location is null

Truth be told, I could've made lines 179 through 181 their own if function instead of chaining it up with the if function starting at line 176, but the behavior is functionally the same

Copy link
Member

Choose a reason for hiding this comment

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

ok gotcha sounds fine

@FalloutFalcon FalloutFalcon added this pull request to the merge queue Feb 8, 2025
Merged via the queue into shiptest-ss13:master with commit 55d76cc Feb 8, 2025
16 checks passed
MrCat15352 pushed a commit to MrCat15352/MrCat that referenced this pull request Feb 16, 2025
…iptest-ss13#4103)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

This PR should fix a runtime that had been popping up with bodycameras
during their testmerges. It should also fix part of the description for
them that I'd erroneously made bold.

## Why It's Good For The Game

Runtimes are not good, and the description was a little confusing in
what words were made bold. A single missing character causes untold
havoc yet again.

## Changelog

:cl:
fix: fixed securEye runtime
fix: fixed bodycamera description typo
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code change Watch something violently break.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants