diff options
author | Mikael Hermansson <mikael@hermansson.io> | 2023-09-26 23:02:00 +0200 |
---|---|---|
committer | Mikael Hermansson <mikael@hermansson.io> | 2023-09-26 23:18:16 +0200 |
commit | f1a9d8b5a5ba5ad7993762176fa5e256c4e69edd (patch) | |
tree | eddb5ea220108403206b2d31a1c6acc4976c0d6e | |
parent | b905959f4382020b424fa093c380e163a7a7f404 (diff) | |
download | redot-engine-f1a9d8b5a5ba5ad7993762176fa5e256c4e69edd.tar.gz |
Moved `face_index` field in 3D `RayResult` to end of struct
-rw-r--r-- | misc/extension_api_validation/4.1-stable.expected | 7 | ||||
-rw-r--r-- | servers/physics_server_3d.h | 2 | ||||
-rw-r--r-- | servers/register_server_types.cpp | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/misc/extension_api_validation/4.1-stable.expected b/misc/extension_api_validation/4.1-stable.expected index 376dfb145c..0fb834bbbf 100644 --- a/misc/extension_api_validation/4.1-stable.expected +++ b/misc/extension_api_validation/4.1-stable.expected @@ -198,3 +198,10 @@ GH-80410 Validate extension JSON: Error: Field 'classes/RichTextLabel/methods/add_image/arguments': size changed value in new API, from 6 to 10. Added optional argument. Compatibility method registered. + + +GH-82403 +-------- +Validate extension JSON: Error: Field 'native_structures/PhysicsServer3DExtensionRayResult': format changed value in new API, from "Vector3 position;Vector3 normal;RID rid;ObjectID collider_id;Object *collider;int shape" to "Vector3 position;Vector3 normal;RID rid;ObjectID collider_id;Object *collider;int shape;int face_index". + +Added/moved face_index field (introduced in GH-71233) to end of struct. Should still be compatible with 4.1. diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index d78a59e17f..248b6cd8f8 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -150,11 +150,11 @@ public: struct RayResult { Vector3 position; Vector3 normal; - int face_index = -1; RID rid; ObjectID collider_id; Object *collider = nullptr; int shape = 0; + int face_index = -1; }; virtual bool intersect_ray(const RayParameters &p_parameters, RayResult &r_result) = 0; diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp index 67e48df9c9..50e14a1f37 100644 --- a/servers/register_server_types.cpp +++ b/servers/register_server_types.cpp @@ -157,7 +157,7 @@ void register_server_types() { GDREGISTER_VIRTUAL_CLASS(PhysicsDirectSpaceState3DExtension) GDREGISTER_VIRTUAL_CLASS(PhysicsServer3DRenderingServerHandler) - GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionRayResult, "Vector3 position;Vector3 normal;RID rid;ObjectID collider_id;Object *collider;int shape"); + GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionRayResult, "Vector3 position;Vector3 normal;RID rid;ObjectID collider_id;Object *collider;int shape;int face_index"); GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionShapeResult, "RID rid;ObjectID collider_id;Object *collider;int shape"); GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionShapeRestInfo, "Vector3 point;Vector3 normal;RID rid;ObjectID collider_id;int shape;Vector3 linear_velocity"); GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionMotionCollision, "Vector3 position;Vector3 normal;Vector3 collider_velocity;Vector3 collider_angular_velocity;real_t depth;int local_shape;ObjectID collider_id;RID collider;int collider_shape"); |