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

Moved face_index field in 3D RayResult to end of struct #82403

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

mihe
Copy link
Contributor

@mihe mihe commented Sep 26, 2023

Fixes #80444.

This moves the new face_index field found in PhysicsDirectSpaceState3D::RayResult, also known/bound as PhysicsServer3DExtensionRayResult, which was introduced in #71233, to the end of the struct, thereby "fixing" the accidental GDExtension compatibility breakage that happened as a result of it being added in the middle of the struct.

Note that while this is still technically a breaking change, since it still changes the size/layout of RayResult, the only part of the GDExtension API that actually uses this is PhysicsDirectSpaceState3DExtension::_intersect_ray, which has you writing to that struct through a pointer, meaning only the field offsets have to be preserved between versions, which this PR should satisfy.

@mihe mihe requested a review from a team as a code owner September 26, 2023 21:17
Copy link
Contributor

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks :-)

Copy link
Member

@rburing rburing left a comment

Choose a reason for hiding this comment

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

LGTM.

@akien-mga akien-mga added this to the 4.2 milestone Sep 26, 2023
@akien-mga akien-mga merged commit 27f86d9 into godotengine:master Sep 27, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@mihe mihe deleted the ray-result-reordering branch September 27, 2023 07:52
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.

PhysicsDirectSpaceState3D::RayResult is not correctly bound
4 participants