From fc9f5d59b5bfd2a4cee5c65837b2b280ae8fa7e9 Mon Sep 17 00:00:00 2001 From: Karroffel Date: Sun, 30 Jul 2017 14:51:34 +0200 Subject: [PATCH] [NativeScript] fix signals from base class not being accessible https://github.com/GodotNativeTools/cpp_bindings/issues/26 --- modules/nativescript/nativescript.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/nativescript/nativescript.cpp b/modules/nativescript/nativescript.cpp index c4cbfcce512..e7445e6da9d 100644 --- a/modules/nativescript/nativescript.cpp +++ b/modules/nativescript/nativescript.cpp @@ -288,9 +288,13 @@ ScriptLanguage *NativeScript::get_language() const { bool NativeScript::has_script_signal(const StringName &p_signal) const { NativeScriptDesc *script_data = get_script_desc(); - if (!script_data) - return false; - return script_data->signals_.has(p_signal); + + while (script_data) { + if (script_data->signals_.has(p_signal)) + return true; + script_data = script_data->base_data; + } + return false; } void NativeScript::get_script_signal_list(List *r_signals) const {