summaryrefslogtreecommitdiff
path: root/scene/main/node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/node.cpp')
-rw-r--r--scene/main/node.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index f1e5574351..14cd76ab7d 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -116,6 +116,9 @@ void Node::_notification(int p_notification) {
memdelete(data.path_cache);
data.path_cache = nullptr;
}
+ if (data.filename.length()) {
+ get_multiplayer()->scene_enter_exit_notify(data.filename, this, false);
+ }
} break;
case NOTIFICATION_PATH_CHANGED: {
if (data.path_cache) {
@@ -147,6 +150,10 @@ void Node::_notification(int p_notification) {
get_script_instance()->call(SceneStringNames::get_singleton()->_ready);
}
+ if (data.filename.length()) {
+ ERR_FAIL_COND(!is_inside_tree());
+ get_multiplayer()->scene_enter_exit_notify(data.filename, this, true);
+ }
} break;
case NOTIFICATION_POSTINITIALIZE: {