mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-25 21:41:04 +00:00
Preload player cell as soon as the player is read from the savegame
Giving the worker thread something to do while the rest of the savegame is parsed.
This commit is contained in:
parent
d141b98f0c
commit
1d8a9ff622
@ -82,14 +82,14 @@ namespace MWWorld
|
||||
void preloadExteriorGrid(const osg::Vec3f& playerPos, const osg::Vec3f& predictedPos);
|
||||
void preloadFastTravelDestinations(const osg::Vec3f& playerPos, const osg::Vec3f& predictedPos);
|
||||
|
||||
void preloadCell(MWWorld::CellStore* cell, bool preloadSurrounding=false);
|
||||
|
||||
public:
|
||||
|
||||
Scene (MWRender::RenderingManager& rendering, MWPhysics::PhysicsSystem *physics);
|
||||
|
||||
~Scene();
|
||||
|
||||
void preloadCell(MWWorld::CellStore* cell, bool preloadSurrounding=false);
|
||||
|
||||
void unloadCell (CellStoreCollection::iterator iter);
|
||||
|
||||
void loadCell (CellStore *cell, Loading::Listener* loadingListener, bool respawn);
|
||||
|
@ -374,10 +374,13 @@ namespace MWWorld
|
||||
reader.getHNT(mTeleportEnabled, "TELE");
|
||||
reader.getHNT(mLevitationEnabled, "LEVT");
|
||||
return;
|
||||
case ESM::REC_PLAY:
|
||||
mPlayer->readRecord(reader, type);
|
||||
mWorldScene->preloadCell(getPlayerPtr().getCell(), true);
|
||||
break;
|
||||
default:
|
||||
if (!mStore.readRecord (reader, type) &&
|
||||
!mGlobalVariables.readRecord (reader, type) &&
|
||||
!mPlayer->readRecord (reader, type) &&
|
||||
!mWeatherManager->readRecord (reader, type) &&
|
||||
!mCells.readRecord (reader, type, contentFileMap)
|
||||
&& !mProjectileManager->readRecord (reader, type)
|
||||
|
Loading…
x
Reference in New Issue
Block a user