diff options
author | George Marques <george@gmarqu.es> | 2020-08-04 09:17:01 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 09:17:01 -0300 |
commit | ec678c5e94ac1c91c099c15fabc398e80ede7bfe (patch) | |
tree | 72b9504b2555d73334e4057d5c2db7ac36421856 | |
parent | 9adf6d3441d4927bdbab7bcb03cfafe42249ba90 (diff) | |
parent | b8671b61fcacc1bc6f3430e6b18fbcc9c9d60358 (diff) |
Merge pull request #40992 from vnen/fix-input-call
Fix _input being mistakenly called twice on script
-rw-r--r-- | scene/main/scene_tree.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 2449b3bd35..adefb53862 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -880,7 +880,10 @@ void SceneTree::_call_input_pause(const StringName &p_group, const StringName &p if (n->get_script_instance()) { n->get_script_instance()->call(p_method, (const Variant **)v, 1, err); } - n->call(p_method, (const Variant **)v, 1, err); + MethodBind *method = ClassDB::get_method(n->get_class_name(), p_method); + if (method) { + method->call(n, (const Variant **)v, 1, err); + } } call_lock--; |