mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 22:45:35 +00:00
CellPreloader: load the terrain first to match the order in the main thread
This commit is contained in:
parent
d3e1dbe920
commit
d62c4259bd
1 changed files with 11 additions and 11 deletions
|
@ -79,6 +79,17 @@ namespace MWWorld
|
||||||
/// Preload work to be called from the worker thread.
|
/// Preload work to be called from the worker thread.
|
||||||
virtual void doWork()
|
virtual void doWork()
|
||||||
{
|
{
|
||||||
|
if (mIsExterior)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mPreloadedObjects.push_back(mTerrain->cacheCell(mX, mY));
|
||||||
|
}
|
||||||
|
catch(std::exception& e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (MeshList::const_iterator it = mMeshes.begin(); it != mMeshes.end(); ++it)
|
for (MeshList::const_iterator it = mMeshes.begin(); it != mMeshes.end(); ++it)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -119,17 +130,6 @@ namespace MWWorld
|
||||||
// error will be shown when visiting the cell
|
// error will be shown when visiting the cell
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mIsExterior)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
mPreloadedObjects.push_back(mTerrain->cacheCell(mX, mY));
|
|
||||||
}
|
|
||||||
catch(std::exception& e)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue