diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-28 11:00:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 11:00:14 +0100 |
commit | f968c11b8630fd82a0772a960e6b68d15944c8f3 (patch) | |
tree | 449913fa5a5fbe1f8b9e7d04695f765e1b7ad65d /scene/3d | |
parent | e7176e6c85e2bb4cb75129daa7389765eb500a75 (diff) | |
parent | 184105e7538a6fa79380c1e400583958be6e6af3 (diff) |
Merge pull request #58596 from rburing/joints_disconnect_connected_signals
`Joint2D` and `Joint3D`: disconnect only connected signals
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/joint_3d.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/3d/joint_3d.cpp b/scene/3d/joint_3d.cpp index 36abd0a5c5..f957b6c732 100644 --- a/scene/3d/joint_3d.cpp +++ b/scene/3d/joint_3d.cpp @@ -124,7 +124,7 @@ void Joint3D::set_node_a(const NodePath &p_node_a) { return; } - if (joint.is_valid()) { + if (is_configured()) { _disconnect_signals(); } @@ -141,7 +141,7 @@ void Joint3D::set_node_b(const NodePath &p_node_b) { return; } - if (joint.is_valid()) { + if (is_configured()) { _disconnect_signals(); } @@ -171,7 +171,7 @@ void Joint3D::_notification(int p_what) { } break; case NOTIFICATION_EXIT_TREE: { - if (joint.is_valid()) { + if (is_configured()) { _disconnect_signals(); _update_joint(true); } |