diff options
| author | Eryk Dwornicki <rootkiller.programmer@gmail.com> | 2021-02-27 17:55:19 +0100 |
|---|---|---|
| committer | Eryk Dwornicki <rootkiller.programmer@gmail.com> | 2021-02-27 20:52:01 +0100 |
| commit | aa42e8920b840a82f0d0d0e1975cdfa66b0b4bd1 (patch) | |
| tree | 9ea645e8664a5e29df08fb589f994aabc8eb6f20 /servers/physics_3d/physics_server_3d_sw.cpp | |
| parent | 0e8fae1038cb27372777623b1af26e6f0cfb34fa (diff) | |
| download | redot-engine-aa42e8920b840a82f0d0d0e1975cdfa66b0b4bd1.tar.gz | |
Move removal of the constraints from bodies to Joint3DSW destructor
Joint3DSW instances are also destroyed without explicitly calling free()
for example when changing constrainted bodies at runtime using
set_node method.
Diffstat (limited to 'servers/physics_3d/physics_server_3d_sw.cpp')
| -rw-r--r-- | servers/physics_3d/physics_server_3d_sw.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/servers/physics_3d/physics_server_3d_sw.cpp b/servers/physics_3d/physics_server_3d_sw.cpp index 735e9094d2..6bbef09907 100644 --- a/servers/physics_3d/physics_server_3d_sw.cpp +++ b/servers/physics_3d/physics_server_3d_sw.cpp @@ -1312,9 +1312,6 @@ void PhysicsServer3DSW::free(RID p_rid) { } else if (joint_owner.owns(p_rid)) { Joint3DSW *joint = joint_owner.getornull(p_rid); - for (int i = 0; i < joint->get_body_count(); i++) { - joint->get_body_ptr()[i]->remove_constraint(joint); - } joint_owner.free(p_rid); memdelete(joint); |
