diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2021-09-07 18:43:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-07 18:43:06 +0200 |
commit | b284cb908ab5ca51099cc1e1b75689cacccfa229 (patch) | |
tree | 07faf2f4de89b6ace32c0d0361865cb2ecb1b50c /scene | |
parent | 0cb22ff0a3a722d9363a8fe7cded5bdffc38d33c (diff) | |
parent | 2b78353e793fbe75c50b786a31628d492c7cac3d (diff) |
Merge pull request #52392 from Shatur/fix-ready
Remove extra get_script_instance check
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/node.cpp | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index f2a2648140..b3fa90e14e 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -123,28 +123,27 @@ void Node::_notification(int p_notification) { } } break; case NOTIFICATION_READY: { - if (get_script_instance()) { - if (GDVIRTUAL_IS_OVERRIDDEN(_input)) { - set_process_input(true); - } - - if (GDVIRTUAL_IS_OVERRIDDEN(_unhandled_input)) { - set_process_unhandled_input(true); - } + if (GDVIRTUAL_IS_OVERRIDDEN(_input)) { + set_process_input(true); + } - if (GDVIRTUAL_IS_OVERRIDDEN(_unhandled_key_input)) { - set_process_unhandled_key_input(true); - } + if (GDVIRTUAL_IS_OVERRIDDEN(_unhandled_input)) { + set_process_unhandled_input(true); + } - if (GDVIRTUAL_IS_OVERRIDDEN(_process)) { - set_process(true); - } - if (GDVIRTUAL_IS_OVERRIDDEN(_physics_process)) { - set_physics_process(true); - } + if (GDVIRTUAL_IS_OVERRIDDEN(_unhandled_key_input)) { + set_process_unhandled_key_input(true); + } - GDVIRTUAL_CALL(_ready); + if (GDVIRTUAL_IS_OVERRIDDEN(_process)) { + set_process(true); } + if (GDVIRTUAL_IS_OVERRIDDEN(_physics_process)) { + set_physics_process(true); + } + + GDVIRTUAL_CALL(_ready); + if (data.filename.length()) { ERR_FAIL_COND(!is_inside_tree()); get_multiplayer()->scene_enter_exit_notify(data.filename, this, true); |