Avoid registering archives twice.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2303 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2009-03-29 20:28:48 +00:00
parent 2e00d39faf
commit b426f83a6b
1 changed files with 7 additions and 0 deletions

View File

@ -152,6 +152,13 @@ bool CFileSystem::registerFileArchive(const core::string<c16>& filename, bool ig
bool ret = false;
u32 i;
// check if the archive was already loaded
for (i = 0; i < FileArchives.size(); ++i)
{
if (filename == FileArchives[i]->getArchiveName())
return true;
}
// try to load archive based on file name
for (i = 0; i < ArchiveLoader.size(); ++i)
{