Skip to content

Commit 4c84eba

Browse files
miheSpartan322
authored andcommitted
Make RID allocation thread-safe when using Jolt Physics
(cherry picked from commit f6126ba)
1 parent b0ee280 commit 4c84eba

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/jolt_physics/jolt_physics_server_3d.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ class JoltPhysicsServer3D final : public PhysicsServer3D {
4949

5050
inline static JoltPhysicsServer3D *singleton = nullptr;
5151

52-
mutable RID_PtrOwner<JoltSpace3D> space_owner;
53-
mutable RID_PtrOwner<JoltArea3D> area_owner;
54-
mutable RID_PtrOwner<JoltBody3D> body_owner;
55-
mutable RID_PtrOwner<JoltSoftBody3D> soft_body_owner;
56-
mutable RID_PtrOwner<JoltShape3D> shape_owner;
57-
mutable RID_PtrOwner<JoltJoint3D> joint_owner;
52+
mutable RID_PtrOwner<JoltSpace3D, true> space_owner;
53+
mutable RID_PtrOwner<JoltArea3D, true> area_owner;
54+
mutable RID_PtrOwner<JoltBody3D, true> body_owner;
55+
mutable RID_PtrOwner<JoltSoftBody3D, true> soft_body_owner;
56+
mutable RID_PtrOwner<JoltShape3D, true> shape_owner;
57+
mutable RID_PtrOwner<JoltJoint3D, true> joint_owner;
5858

5959
HashSet<JoltSpace3D *> active_spaces;
6060

0 commit comments

Comments
 (0)