mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Move prepareMaster logic into addMaster. Having these separate only introduces the possibility for a bug.
This commit is contained in:
parent
59a2e8dcf7
commit
de7087caf4
2 changed files with 7 additions and 16 deletions
|
@ -20,18 +20,6 @@ OMW::Engine::Engine()
|
|||
{
|
||||
}
|
||||
|
||||
// adjust name and load bsa
|
||||
|
||||
void OMW::Engine::prepareMaster()
|
||||
{
|
||||
std::string::size_type sep = mMaster.find_last_of (".");
|
||||
|
||||
if (sep==std::string::npos)
|
||||
{
|
||||
mMaster += ".esm";
|
||||
}
|
||||
}
|
||||
|
||||
// Load all BSA files in data directory.
|
||||
|
||||
void OMW::Engine::loadBSA()
|
||||
|
@ -79,6 +67,13 @@ void OMW::Engine::addMaster (const std::string& master)
|
|||
{
|
||||
assert (mMaster.empty());
|
||||
mMaster = master;
|
||||
|
||||
// Append .esm if not already there
|
||||
std::string::size_type sep = mMaster.find_last_of (".");
|
||||
if (sep == std::string::npos)
|
||||
{
|
||||
mMaster += ".esm";
|
||||
}
|
||||
}
|
||||
|
||||
// Enables sky rendering
|
||||
|
@ -109,7 +104,6 @@ void OMW::Engine::go()
|
|||
addResourcesDirectory (mDataDir / "Meshes");
|
||||
addResourcesDirectory (mDataDir / "Textures");
|
||||
|
||||
prepareMaster();
|
||||
loadBSA();
|
||||
|
||||
boost::filesystem::path masterPath (mDataDir);
|
||||
|
|
|
@ -30,9 +30,6 @@ namespace OMW
|
|||
Engine (const Engine&);
|
||||
Engine& operator= (const Engine&);
|
||||
|
||||
/// adjust name and load bsa
|
||||
void prepareMaster();
|
||||
|
||||
/// add resources directory
|
||||
/// \note This function works recursively.
|
||||
void addResourcesDirectory (const boost::filesystem::path& path);
|
||||
|
|
Loading…
Reference in a new issue