浏览代码

(Fix) script will not be able to extend itself

mostafahassan 10 年之前
父节点
当前提交
73ff3ac218
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/gdscript/gd_script.cpp

+ 1 - 1
modules/gdscript/gd_script.cpp

@@ -1689,7 +1689,7 @@ bool GDScript::_update_exports() {
 			}
 
 
-			if (c->extends_used && String(c->extends_file)!="") {
+			if (c->extends_used && String(c->extends_file)!="" && String(c->extends_file) != get_path()) {
 
 				String path = c->extends_file;
 				if (path.is_rel_path()) {