mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 09:32:45 +00:00
Preload terrain while reading savegame
This commit is contained in:
parent
e4e8821902
commit
c22fde2bcd
@ -809,6 +809,13 @@ namespace MWWorld
|
||||
mPreloader->preload(cell, mRendering.getReferenceTime());
|
||||
}
|
||||
|
||||
void Scene::preloadTerrain(const osg::Vec3f &pos)
|
||||
{
|
||||
std::vector<osg::Vec3f> vec;
|
||||
vec.push_back(pos);
|
||||
mPreloader->setTerrainPreloadPositions(vec);
|
||||
}
|
||||
|
||||
struct ListFastTravelDestinationsVisitor
|
||||
{
|
||||
ListFastTravelDestinationsVisitor(float preloadDist, const osg::Vec3f& playerPos)
|
||||
|
@ -89,6 +89,7 @@ namespace MWWorld
|
||||
~Scene();
|
||||
|
||||
void preloadCell(MWWorld::CellStore* cell, bool preloadSurrounding=false);
|
||||
void preloadTerrain(const osg::Vec3f& pos);
|
||||
|
||||
void unloadCell (CellStoreCollection::iterator iter);
|
||||
|
||||
|
@ -379,6 +379,7 @@ namespace MWWorld
|
||||
case ESM::REC_PLAY:
|
||||
mPlayer->readRecord(reader, type);
|
||||
mWorldScene->preloadCell(getPlayerPtr().getCell(), true);
|
||||
mWorldScene->preloadTerrain(getPlayerPtr().getRefData().getPosition().asVec3());
|
||||
break;
|
||||
default:
|
||||
if (!mStore.readRecord (reader, type) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user