|
|
@ -1101,18 +1101,17 @@ namespace MWWorld
|
|
|
|
if (mPreloadEnabled)
|
|
|
|
if (mPreloadEnabled)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mPreloadDoors)
|
|
|
|
if (mPreloadDoors)
|
|
|
|
preloadTeleportDoorDestinations(playerPos, predictedPos, exteriorPositions);
|
|
|
|
preloadTeleportDoorDestinations(playerPos, predictedPos);
|
|
|
|
if (mPreloadExteriorGrid)
|
|
|
|
if (mPreloadExteriorGrid)
|
|
|
|
preloadExteriorGrid(playerPos, predictedPos);
|
|
|
|
preloadExteriorGrid(playerPos, predictedPos);
|
|
|
|
if (mPreloadFastTravel)
|
|
|
|
if (mPreloadFastTravel)
|
|
|
|
preloadFastTravelDestinations(playerPos, predictedPos, exteriorPositions);
|
|
|
|
preloadFastTravelDestinations(playerPos, exteriorPositions);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
mPreloader->setTerrainPreloadPositions(exteriorPositions);
|
|
|
|
mPreloader->setTerrainPreloadPositions(exteriorPositions);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Scene::preloadTeleportDoorDestinations(
|
|
|
|
void Scene::preloadTeleportDoorDestinations(const osg::Vec3f& playerPos, const osg::Vec3f& predictedPos)
|
|
|
|
const osg::Vec3f& playerPos, const osg::Vec3f& predictedPos, std::vector<PositionCellGrid>& exteriorPositions)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::vector<MWWorld::ConstPtr> teleportDoors;
|
|
|
|
std::vector<MWWorld::ConstPtr> teleportDoors;
|
|
|
|
for (const MWWorld::CellStore* cellStore : mActiveCells)
|
|
|
|
for (const MWWorld::CellStore* cellStore : mActiveCells)
|
|
|
@ -1281,12 +1280,10 @@ namespace MWWorld
|
|
|
|
std::vector<ESM::Transport::Dest> mList;
|
|
|
|
std::vector<ESM::Transport::Dest> mList;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
void Scene::preloadFastTravelDestinations(const osg::Vec3f& playerPos, const osg::Vec3f& /*predictedPos*/,
|
|
|
|
void Scene::preloadFastTravelDestinations(
|
|
|
|
std::vector<PositionCellGrid>& exteriorPositions) // ignore predictedPos here since opening dialogue with
|
|
|
|
const osg::Vec3f& playerPos, std::vector<PositionCellGrid>& exteriorPositions)
|
|
|
|
// travel service takes extra time
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const MWWorld::ConstPtr player = mWorld.getPlayerPtr();
|
|
|
|
ListFastTravelDestinationsVisitor listVisitor(mPreloadDistance, playerPos);
|
|
|
|
ListFastTravelDestinationsVisitor listVisitor(mPreloadDistance, player.getRefData().getPosition().asVec3());
|
|
|
|
|
|
|
|
ESM::RefId extWorldspace = mWorld.getCurrentWorldspace();
|
|
|
|
ESM::RefId extWorldspace = mWorld.getCurrentWorldspace();
|
|
|
|
for (MWWorld::CellStore* cellStore : mActiveCells)
|
|
|
|
for (MWWorld::CellStore* cellStore : mActiveCells)
|
|
|
|
{
|
|
|
|
{
|
|
|
|