Merge pull request #83583 from anrp/anrp/gdvirtboth

Allow coexistence of GDScript and GDExtension virtual methods in the same object
This commit is contained in:
Rémi Verschelde 2023-10-20 15:09:27 +02:00
commit 01a8064760
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -47,8 +47,8 @@ _FORCE_INLINE_ bool _gdvirtual_##m_name##_call($CALLARGS) $CONST { \\
}\\
_FORCE_INLINE_ bool _gdvirtual_##m_name##_overridden() const { \\
ScriptInstance *_script_instance = ((Object*)(this))->get_script_instance();\\
if (_script_instance) {\\
return _script_instance->has_method(_gdvirtual_##m_name##_sn);\\
if (_script_instance && _script_instance->has_method(_gdvirtual_##m_name##_sn)) {\\
return true;\\
}\\
if (unlikely(_get_extension() && !_gdvirtual_##m_name##_initialized)) {\\
_gdvirtual_##m_name = nullptr;\\