1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

-Fixed bug in "extends"

This commit is contained in:
Juan Linietsky
2014-05-24 13:25:56 -03:00
parent 1cad087969
commit 71355aaab7
4 changed files with 17 additions and 111 deletions

View File

@@ -1321,6 +1321,16 @@ Error GDCompiler::_parse_class(GDScript *p_script,GDScript *p_owner,const GDPars
if (path!="") {
//path (and optionally subclasses)
if (path.is_rel_path()) {
String base = p_script->get_path();
if (base=="" || base.is_rel_path()) {
_set_error("Could not resolve relative path for parent class: "+path,p_class);
return ERR_FILE_NOT_FOUND;
}
path=base.get_base_dir().plus_file(path);
}
script = ResourceLoader::load(path);
if (script.is_null()) {
_set_error("Could not load base class: "+path,p_class);