Skip to content

fix(gta-core-five): invalid bounding volume hierarchy #3349

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

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

Conversation

DaniGP17
Copy link
Contributor

Goal of this PR

Fix a crash that occurred in the call to the CalcClosestLeafDistance function that is responsible for traversing the bvh to find the squared distance to the closest leaf node from the given position.
The function could crash if the bvh or bvhNode pointer was null.

How is this PR achieving the goal

Adding a check before the original call of the function.

This PR applies to the following area(s)

FiveM

Successfully tested on

Game builds: 1604, 3095, 3407

Platforms: Windows, Linux

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

fixes #3155

@github-actions github-actions bot added the triage Needs a preliminary assessment to determine the urgency and required action label Apr 19, 2025
@Nobelium-cfx Nobelium-cfx added ready-to-merge This PR is enqueued for merging and removed triage Needs a preliminary assessment to determine the urgency and required action labels Apr 21, 2025
@github-actions github-actions bot added the triage Needs a preliminary assessment to determine the urgency and required action label Apr 21, 2025
tweak(gta-core-five): add missing padding to phOptimizedBvh structure
@DaniGP17 DaniGP17 force-pushed the fix/bounding-volume-hierarchy branch from 0097074 to 0f373a3 Compare April 23, 2025 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR is enqueued for merging triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

table-ohio-emma crash
2 participants