diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-05-24 13:25:56 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-05-24 13:25:56 -0300 |
commit | 71355aaab7eca64bec694918c6b911a412ad17f0 (patch) | |
tree | aac0ea577a292092ac2e7e92ca9a76608faeae7c /modules/gdscript | |
parent | 1cad087969efefa401a11051343cd0689f660770 (diff) |
-Fixed bug in "extends"
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gd_compiler.cpp | 10 | ||||
-rw-r--r-- | modules/gdscript/gd_script.cpp | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index 548b10cf15..f1b7ad0096 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -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); diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 0d49f79f1c..d183782864 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -389,6 +389,8 @@ Variant GDFunction::call(GDInstance *p_instance,const Variant **p_args, int p_ar } } + + } else { GDNativeClass *nc= obj_B->cast_to<GDNativeClass>(); |