浏览代码

Merge pull request #100342 from mihe/jolt/thread-safe-rids

Make `RID` allocation thread-safe when using Jolt Physics
Thaddeus Crews 9 月之前
父节点
当前提交
b68675e518
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      modules/jolt_physics/jolt_physics_server_3d.h

+ 6 - 6
modules/jolt_physics/jolt_physics_server_3d.h

@@ -47,12 +47,12 @@ class JoltPhysicsServer3D final : public PhysicsServer3D {
 
 
 	inline static JoltPhysicsServer3D *singleton = nullptr;
 	inline static JoltPhysicsServer3D *singleton = nullptr;
 
 
-	mutable RID_PtrOwner<JoltSpace3D> space_owner;
-	mutable RID_PtrOwner<JoltArea3D> area_owner;
-	mutable RID_PtrOwner<JoltBody3D> body_owner;
-	mutable RID_PtrOwner<JoltSoftBody3D> soft_body_owner;
-	mutable RID_PtrOwner<JoltShape3D> shape_owner;
-	mutable RID_PtrOwner<JoltJoint3D> joint_owner;
+	mutable RID_PtrOwner<JoltSpace3D, true> space_owner;
+	mutable RID_PtrOwner<JoltArea3D, true> area_owner;
+	mutable RID_PtrOwner<JoltBody3D, true> body_owner;
+	mutable RID_PtrOwner<JoltSoftBody3D, true> soft_body_owner;
+	mutable RID_PtrOwner<JoltShape3D, true> shape_owner;
+	mutable RID_PtrOwner<JoltJoint3D, true> joint_owner;
 
 
 	HashSet<JoltSpace3D *> active_spaces;
 	HashSet<JoltSpace3D *> active_spaces;