From 5a96c242430a0cac9493ce0a814151d2239ce153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 25 Aug 2020 13:01:55 +0200 Subject: [PATCH] Revert "Check if global class file still exists before registering it" And revert follow-up regression fix "Remap script path when registering class." After the regression fix, the original issue is valid again so it's better to go back to the previous state. This reverts commits e264ae20d2a828201a50868b3af334a3f8c8a37c and fceb64827ea50364f34f4ba9db3910602d1911bf. (cherry picked from commit f13207254c9a55a0adccf45707c8e4623c2649ac) --- core/script_language.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/script_language.cpp b/core/script_language.cpp index ff96842d3bf..7392e7a0afc 100644 --- a/core/script_language.cpp +++ b/core/script_language.cpp @@ -31,8 +31,6 @@ #include "script_language.h" #include "core/core_string_names.h" -#include "core/io/resource_loader.h" -#include "core/os/file_access.h" #include "core/project_settings.h" ScriptLanguage *ScriptServer::_languages[MAX_LANGUAGES]; @@ -168,7 +166,7 @@ void ScriptServer::init_languages() { for (int i = 0; i < script_classes.size(); i++) { Dictionary c = script_classes[i]; - if (!c.has("class") || !c.has("language") || !c.has("path") || !FileAccess::exists(ResourceLoader::path_remap(c["path"])) || !c.has("base")) + if (!c.has("class") || !c.has("language") || !c.has("path") || !c.has("base")) continue; add_global_class(c["class"], c["base"], c["language"], c["path"]); }