summaryrefslogtreecommitdiff
path: root/scene/3d/visibility_notifier.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-28 17:19:08 +0100
committerGitHub <noreply@github.com>2020-02-28 17:19:08 +0100
commit324e5a60dd068cbbff9c433802f8ecb78cff3364 (patch)
tree41edf077bcafa3c959a417aa4700318d483ff680 /scene/3d/visibility_notifier.cpp
parenta439131c2b06b3d452e5be13530b6d2caa72c1aa (diff)
parent32ccf306f9a820e2ac5811de7c12e99a736fdf05 (diff)
Merge pull request #36426 from akien-mga/calling-all-stations
Signals: Port connect calls to use callable_mp
Diffstat (limited to 'scene/3d/visibility_notifier.cpp')
-rw-r--r--scene/3d/visibility_notifier.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp
index 3bf9584258..986607f18d 100644
--- a/scene/3d/visibility_notifier.cpp
+++ b/scene/3d/visibility_notifier.cpp
@@ -170,7 +170,7 @@ void VisibilityEnabler::_find_nodes(Node *p_node) {
if (add) {
- p_node->connect_compat(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed", varray(p_node), CONNECT_ONESHOT);
+ p_node->connect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &VisibilityEnabler::_node_removed), varray(p_node), CONNECT_ONESHOT);
nodes[p_node] = meta;
_change_node_state(p_node, false);
}
@@ -208,7 +208,7 @@ void VisibilityEnabler::_notification(int p_what) {
if (!visible)
_change_node_state(E->key(), true);
- E->key()->disconnect_compat(SceneStringNames::get_singleton()->tree_exiting, this, "_node_removed");
+ E->key()->disconnect(SceneStringNames::get_singleton()->tree_exiting, callable_mp(this, &VisibilityEnabler::_node_removed));
}
nodes.clear();
@@ -247,7 +247,6 @@ void VisibilityEnabler::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_enabler", "enabler", "enabled"), &VisibilityEnabler::set_enabler);
ClassDB::bind_method(D_METHOD("is_enabler_enabled", "enabler"), &VisibilityEnabler::is_enabler_enabled);
- ClassDB::bind_method(D_METHOD("_node_removed"), &VisibilityEnabler::_node_removed);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "pause_animations"), "set_enabler", "is_enabler_enabled", ENABLER_PAUSE_ANIMATIONS);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "freeze_bodies"), "set_enabler", "is_enabler_enabled", ENABLER_FREEZE_BODIES);