Always run preloadCommonAssets even when the menu is skipped

Move to before the content files are loaded so we can do preloading in parallel with content file loading
This commit is contained in:
scrawl 2017-02-09 02:59:10 +01:00
parent 839928e210
commit 066aa2e60e
4 changed files with 2 additions and 11 deletions

View file

@ -650,8 +650,6 @@ void OMW::Engine::go()
} }
else if (!mSkipMenu) else if (!mSkipMenu)
{ {
mEnvironment.getWorld()->preloadCommonAssets();
// start in main menu // start in main menu
mEnvironment.getWindowManager()->pushGuiMode (MWGui::GM_MainMenu); mEnvironment.getWindowManager()->pushGuiMode (MWGui::GM_MainMenu);
try try

View file

@ -95,8 +95,6 @@ namespace MWBase
virtual ~World() {} virtual ~World() {}
virtual void preloadCommonAssets() = 0;
virtual void startNewGame (bool bypass) = 0; virtual void startNewGame (bool bypass) = 0;
///< \param bypass Bypass regular game start. ///< \param bypass Bypass regular game start.

View file

@ -157,6 +157,8 @@ namespace MWWorld
mRendering = new MWRender::RenderingManager(viewer, rootNode, resourceSystem, &mFallback, resourcePath); mRendering = new MWRender::RenderingManager(viewer, rootNode, resourceSystem, &mFallback, resourcePath);
mProjectileManager.reset(new ProjectileManager(mRendering->getLightRoot(), resourceSystem, mRendering, mPhysics)); mProjectileManager.reset(new ProjectileManager(mRendering->getLightRoot(), resourceSystem, mRendering, mPhysics));
mRendering->preloadCommonAssets();
mEsm.resize(contentFiles.size()); mEsm.resize(contentFiles.size());
Loading::Listener* listener = MWBase::Environment::get().getWindowManager()->getLoadingScreen(); Loading::Listener* listener = MWBase::Environment::get().getWindowManager()->getLoadingScreen();
listener->loadingOn(); listener->loadingOn();
@ -3348,9 +3350,4 @@ namespace MWWorld
return mPhysics->getHitDistance(weaponPos, target) - halfExtents.y(); return mPhysics->getHitDistance(weaponPos, target) - halfExtents.y();
} }
void World::preloadCommonAssets()
{
mRendering->preloadCommonAssets();
}
} }

View file

@ -191,8 +191,6 @@ namespace MWWorld
virtual void startNewGame (bool bypass); virtual void startNewGame (bool bypass);
///< \param bypass Bypass regular game start. ///< \param bypass Bypass regular game start.
virtual void preloadCommonAssets();
virtual void clear(); virtual void clear();
virtual int countSavedGameRecords() const; virtual int countSavedGameRecords() const;