mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Fix loading levels that are... uh, just levels.
This commit is contained in:
parent
4154066c26
commit
ea74b93f38
3 changed files with 7 additions and 2 deletions
|
@ -241,7 +241,7 @@ bool FILESYSTEM_isMounted(const char* filename)
|
||||||
return PHYSFS_getMountPoint(filename) != NULL;
|
return PHYSFS_getMountPoint(filename) != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool FILESYSTEM_exists(const char *fname)
|
bool FILESYSTEM_exists(const char *fname)
|
||||||
{
|
{
|
||||||
return PHYSFS_exists(fname);
|
return PHYSFS_exists(fname);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ char *FILESYSTEM_getUserLevelDirectory(void);
|
||||||
|
|
||||||
bool FILESYSTEM_isFile(const char* filename);
|
bool FILESYSTEM_isFile(const char* filename);
|
||||||
bool FILESYSTEM_isMounted(const char* filename);
|
bool FILESYSTEM_isMounted(const char* filename);
|
||||||
|
bool FILESYSTEM_exists(const char *filename);
|
||||||
|
|
||||||
void FILESYSTEM_loadZip(const char* filename);
|
void FILESYSTEM_loadZip(const char* filename);
|
||||||
bool FILESYSTEM_mountAssets(const char *path);
|
bool FILESYSTEM_mountAssets(const char *path);
|
||||||
|
|
|
@ -1770,7 +1770,11 @@ bool editorclass::load(std::string& _path)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MAYBE_FAIL(FILESYSTEM_mountAssets(_path.c_str()));
|
/* "Sometimes a level is just a level." */
|
||||||
|
if (!FILESYSTEM_exists(_path.c_str()))
|
||||||
|
{
|
||||||
|
MAYBE_FAIL(FILESYSTEM_mountAssets(_path.c_str()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!FILESYSTEM_loadTiXml2Document(_path.c_str(), doc))
|
if (!FILESYSTEM_loadTiXml2Document(_path.c_str(), doc))
|
||||||
|
|
Loading…
Reference in a new issue