Browse Source

GDScript: More reliable check if loading a template.

Prevents showing some useless parse errors in the console.
Andreas Haas 8 years ago
parent
commit
f61e8695c9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/gdscript/gd_script.cpp

+ 1 - 1
modules/gdscript/gd_script.cpp

@@ -616,7 +616,7 @@ Error GDScript::reload(bool p_keep_state) {
 	if (basedir != "")
 		basedir = basedir.get_base_dir();
 
-	if (basedir != "" && basedir.find("res://") == -1 && basedir.find("user://") == -1) {
+	if (source.find("%BASE%") != -1) {
 		//loading a template, don't parse
 		return OK;
 	}