From b8671b61fcacc1bc6f3430e6b18fbcc9c9d60358 Mon Sep 17 00:00:00 2001 From: George Marques Date: Mon, 3 Aug 2020 08:39:04 -0300 Subject: Fix _input being mistakenly called twice on script Instead it calls both the script and the native method. --- scene/main/scene_tree.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scene/main/scene_tree.cpp') 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--; -- cgit v1.2.3