From a92d2c447bf6cbe926081ff5e3070ab037237c95 Mon Sep 17 00:00:00 2001 From: Julien Nguyen Date: Wed, 14 Jul 2021 17:23:54 +0200 Subject: Fix extends with relative path to parent script --- modules/gdscript/gdscript_analyzer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/gdscript/gdscript_analyzer.cpp') diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index f2b601dc2c..3987bcd903 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -242,6 +242,9 @@ Error GDScriptAnalyzer::resolve_inheritance(GDScriptParser::ClassNode *p_class, int extends_index = 0; if (!p_class->extends_path.is_empty()) { + if (p_class->extends_path.is_relative_path()) { + p_class->extends_path = class_type.script_path.get_base_dir().plus_file(p_class->extends_path).simplify_path(); + } Ref parser = get_parser_for(p_class->extends_path); if (parser.is_null()) { push_error(vformat(R"(Could not resolve super class path "%s".)", p_class->extends_path), p_class); -- cgit v1.2.3