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 e264ae20d2 and
fceb64827e.

(cherry picked from commit f13207254c)
This commit is contained in:
Rémi Verschelde 2020-08-25 13:01:55 +02:00
parent 2d42625184
commit 5a96c24243
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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"]);
}