GDScript: More reliable check if loading a template.

Prevents showing some useless parse errors in the console.
This commit is contained in:
Andreas Haas 2017-08-24 22:07:56 +02:00
parent a518ed105c
commit f61e8695c9
No known key found for this signature in database
GPG key ID: B5FFAE1B65FBD2E1

View file

@ -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;
}