Joint2D and Joint: make set_exclude_nodes_from_collision respect signals

(cherry picked from commit 322e3a9567)
This commit is contained in:
Ricardo Buring 2022-02-28 22:51:40 +01:00 committed by Rémi Verschelde
parent fb6394f58c
commit a57dc1881b
2 changed files with 7 additions and 1 deletions

View File

@ -198,7 +198,9 @@ void Joint2D::set_exclude_nodes_from_collision(bool p_enable) {
if (exclude_from_collision == p_enable) {
return;
}
if (joint.is_valid()) {
_disconnect_signals();
}
_update_joint(true);
exclude_from_collision = p_enable;
_update_joint();

View File

@ -197,6 +197,10 @@ void Joint::set_exclude_nodes_from_collision(bool p_enable) {
if (exclude_from_collision == p_enable) {
return;
}
if (joint.is_valid()) {
_disconnect_signals();
}
_update_joint(true);
exclude_from_collision = p_enable;
_update_joint();
}