mirror of
https://github.com/godotengine/godot
synced 2024-09-15 21:59:57 +00:00
Merge pull request #90340 from KoBeWi/FixJoint2D
Fix PinJoint2D deferred call error
This commit is contained in:
commit
2e1f33793f
|
@ -136,7 +136,7 @@ void Joint2D::set_node_a(const NodePath &p_node_a) {
|
||||||
if (Engine::get_singleton()->is_editor_hint()) {
|
if (Engine::get_singleton()->is_editor_hint()) {
|
||||||
// When in editor, the setter may be called as a result of node rename.
|
// When in editor, the setter may be called as a result of node rename.
|
||||||
// It happens before the node actually changes its name, which triggers false warning.
|
// It happens before the node actually changes its name, which triggers false warning.
|
||||||
callable_mp(this, &Joint2D::_update_joint).call_deferred();
|
callable_mp(this, &Joint2D::_update_joint).call_deferred(false);
|
||||||
} else {
|
} else {
|
||||||
_update_joint();
|
_update_joint();
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ void Joint2D::set_node_b(const NodePath &p_node_b) {
|
||||||
|
|
||||||
b = p_node_b;
|
b = p_node_b;
|
||||||
if (Engine::get_singleton()->is_editor_hint()) {
|
if (Engine::get_singleton()->is_editor_hint()) {
|
||||||
callable_mp(this, &Joint2D::_update_joint).call_deferred();
|
callable_mp(this, &Joint2D::_update_joint).call_deferred(false);
|
||||||
} else {
|
} else {
|
||||||
_update_joint();
|
_update_joint();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue