From a1df4c1383797eec6a6a45ac60d9802e3250caf7 Mon Sep 17 00:00:00 2001 From: Misa Date: Wed, 18 Aug 2021 09:52:38 -0700 Subject: [PATCH] Revert "Fix loading levels that are... uh, just levels." This reverts commit ea74b93f38eddfe87603e92bf838a11598588998. This is reverted for being a bit of a hack in my opinion. --- desktop_version/src/FileSystemUtils.cpp | 2 +- desktop_version/src/FileSystemUtils.h | 1 - desktop_version/src/editor.cpp | 6 +----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/desktop_version/src/FileSystemUtils.cpp b/desktop_version/src/FileSystemUtils.cpp index 8e504232..683b6080 100644 --- a/desktop_version/src/FileSystemUtils.cpp +++ b/desktop_version/src/FileSystemUtils.cpp @@ -241,7 +241,7 @@ bool FILESYSTEM_isMounted(const char* filename) return PHYSFS_getMountPoint(filename) != NULL; } -bool FILESYSTEM_exists(const char *fname) +static bool FILESYSTEM_exists(const char *fname) { return PHYSFS_exists(fname); } diff --git a/desktop_version/src/FileSystemUtils.h b/desktop_version/src/FileSystemUtils.h index 81d2d300..c0269ce1 100644 --- a/desktop_version/src/FileSystemUtils.h +++ b/desktop_version/src/FileSystemUtils.h @@ -17,7 +17,6 @@ char *FILESYSTEM_getUserLevelDirectory(void); bool FILESYSTEM_isFile(const char* filename); bool FILESYSTEM_isMounted(const char* filename); -bool FILESYSTEM_exists(const char *filename); void FILESYSTEM_loadZip(const char* filename); bool FILESYSTEM_mountAssets(const char *path); diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index 3f9a252a..fbcf20c7 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -1770,11 +1770,7 @@ bool editorclass::load(std::string& _path) } else { - /* "Sometimes a level is just a level." */ - if (!FILESYSTEM_exists(_path.c_str())) - { - MAYBE_FAIL(FILESYSTEM_mountAssets(_path.c_str())); - } + MAYBE_FAIL(FILESYSTEM_mountAssets(_path.c_str())); } if (!FILESYSTEM_loadTiXml2Document(_path.c_str(), doc))