Remove unused arguments from preload functions

esm4-texture
elsid 8 months ago
parent 7290ce81c0
commit 6f70350f2f
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -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)
{ {

@ -124,11 +124,10 @@ namespace MWWorld
void requestChangeCellGrid(const osg::Vec3f& position, const osg::Vec2i& cell, bool changeEvent = true); void requestChangeCellGrid(const osg::Vec3f& position, const osg::Vec2i& cell, bool changeEvent = true);
void preloadCells(float dt); void preloadCells(float dt);
void preloadTeleportDoorDestinations(const osg::Vec3f& playerPos, const osg::Vec3f& predictedPos, void preloadTeleportDoorDestinations(const osg::Vec3f& playerPos, const osg::Vec3f& predictedPos);
std::vector<PositionCellGrid>& exteriorPositions);
void preloadExteriorGrid(const osg::Vec3f& playerPos, const osg::Vec3f& predictedPos); void preloadExteriorGrid(const osg::Vec3f& playerPos, const osg::Vec3f& predictedPos);
void preloadFastTravelDestinations(const osg::Vec3f& playerPos, const osg::Vec3f& predictedPos, void preloadFastTravelDestinations(
std::vector<PositionCellGrid>& exteriorPositions); const osg::Vec3f& playerPos, std::vector<PositionCellGrid>& exteriorPositions);
osg::Vec4i gridCenterToBounds(const osg::Vec2i& centerCell) const; osg::Vec4i gridCenterToBounds(const osg::Vec2i& centerCell) const;
osg::Vec2i getNewGridCenter(const osg::Vec3f& pos, const osg::Vec2i* currentGridCenter = nullptr) const; osg::Vec2i getNewGridCenter(const osg::Vec3f& pos, const osg::Vec2i* currentGridCenter = nullptr) const;

Loading…
Cancel
Save