diff options
author | Julien Nguyen <julien.nguyen3@gmail.com> | 2021-07-14 17:23:54 +0200 |
---|---|---|
committer | Julien Nguyen <julien.nguyen3@gmail.com> | 2021-09-05 00:11:04 +0200 |
commit | a92d2c447bf6cbe926081ff5e3070ab037237c95 (patch) | |
tree | 825dcd28fb4177bb64d0909c2d67f8c9af22d539 /modules/gdscript/gdscript_analyzer.cpp | |
parent | 0bdbce672c3c7b1894a6ac76cb2202966b05e735 (diff) | |
download | redot-engine-a92d2c447bf6cbe926081ff5e3070ab037237c95.tar.gz |
Fix extends with relative path to parent script
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r-- | modules/gdscript/gdscript_analyzer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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<GDScriptParserRef> 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); |