Przeglądaj źródła

Merge branch 'pr_PreventScriptFromExtendingItself'

mostafahassan 10 lat temu
rodzic
commit
ec1aea5b3b
1 zmienionych plików z 1 dodań i 1 usunięć
  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;
 				String path = c->extends_file;
 				if (path.is_rel_path()) {
 				if (path.is_rel_path()) {