Explorar o código

(Fix) script will not be able to extend itself

mostafahassan %!s(int64=10) %!d(string=hai) anos
pai
achega
73ff3ac218
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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()) {