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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

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