1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00

Simplify a funny-written function

This commit is contained in:
jvoisin 2023-05-01 16:36:48 +02:00
parent 83203ae4d9
commit 5299065cad
3 changed files with 4 additions and 17 deletions

View File

@ -403,20 +403,10 @@ namespace MWWorld
mWorkQueue = workQueue;
}
bool CellPreloader::syncTerrainLoad(
const std::vector<CellPreloader::PositionCellGrid>& positions, double timestamp, Loading::Listener& listener)
void CellPreloader::syncTerrainLoad(Loading::Listener& listener)
{
if (!mTerrainPreloadItem)
return true;
else if (mTerrainPreloadItem->isDone())
{
return true;
}
else
{
if (mTerrainPreloadItem != nullptr && !mTerrainPreloadItem->isDone())
mTerrainPreloadItem->wait(listener);
return true;
}
}
void CellPreloader::abortTerrainPreloadExcept(const CellPreloader::PositionCellGrid* exceptPos)

View File

@ -71,8 +71,7 @@ namespace MWWorld
typedef std::pair<osg::Vec3f, osg::Vec4i> PositionCellGrid;
void setTerrainPreloadPositions(const std::vector<PositionCellGrid>& positions);
bool syncTerrainLoad(const std::vector<CellPreloader::PositionCellGrid>& positions, double timestamp,
Loading::Listener& listener);
void syncTerrainLoad(Loading::Listener& listener);
void abortTerrainPreloadExcept(const PositionCellGrid* exceptPos);
bool isTerrainLoaded(const CellPreloader::PositionCellGrid& position, double referenceTime) const;

View File

@ -1218,9 +1218,7 @@ namespace MWWorld
loadingListener->setLabel("#{OMWEngine:InitializingData}");
while (!mPreloader->syncTerrainLoad(vec, mRendering.getReferenceTime(), *loadingListener))
{
}
mPreloader->syncTerrainLoad(*loadingListener);
}
void Scene::reloadTerrain()