forked from teamnwah/openmw-tes3coop
Fix seg fault, undo changes BsaArchive
This commit is contained in:
parent
8c4b12a603
commit
d3d04171f9
3 changed files with 9 additions and 17 deletions
|
@ -297,7 +297,8 @@ void CSVRender::Cell::reloadAssets()
|
|||
mTerrain->loadCell(mCoordinates.getX(), mCoordinates.getY());
|
||||
}
|
||||
|
||||
mCellWater->reloadAssets();
|
||||
if (mCellWater)
|
||||
mCellWater->reloadAssets();
|
||||
}
|
||||
|
||||
void CSVRender::Cell::setSelection (int elementMask, Selection mode)
|
||||
|
|
|
@ -5,9 +5,14 @@ namespace VFS
|
|||
|
||||
|
||||
BsaArchive::BsaArchive(const std::string &filename)
|
||||
: mFileName(filename)
|
||||
{
|
||||
load();
|
||||
mFile.open(filename);
|
||||
|
||||
const Bsa::BSAFile::FileList &filelist = mFile.getList();
|
||||
for(Bsa::BSAFile::FileList::const_iterator it = filelist.begin();it != filelist.end();++it)
|
||||
{
|
||||
mResources.push_back(BsaArchiveFile(&*it, &mFile));
|
||||
}
|
||||
}
|
||||
|
||||
void BsaArchive::listResources(std::map<std::string, File *> &out, char (*normalize_function)(char))
|
||||
|
@ -21,17 +26,6 @@ void BsaArchive::listResources(std::map<std::string, File *> &out, char (*normal
|
|||
}
|
||||
}
|
||||
|
||||
void BsaArchive::load()
|
||||
{
|
||||
mFile.open(mFileName);
|
||||
|
||||
const Bsa::BSAFile::FileList &filelist = mFile.getList();
|
||||
for(Bsa::BSAFile::FileList::const_iterator it = filelist.begin();it != filelist.end();++it)
|
||||
{
|
||||
mResources.push_back(BsaArchiveFile(&*it, &mFile));
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
BsaArchiveFile::BsaArchiveFile(const Bsa::BSAFile::FileStruct *info, Bsa::BSAFile* bsa)
|
||||
|
|
|
@ -27,9 +27,6 @@ namespace VFS
|
|||
virtual void listResources(std::map<std::string, File*>& out, char (*normalize_function) (char));
|
||||
|
||||
private:
|
||||
void load();
|
||||
|
||||
std::string mFileName;
|
||||
Bsa::BSAFile mFile;
|
||||
|
||||
std::vector<BsaArchiveFile> mResources;
|
||||
|
|
Loading…
Reference in a new issue