forked from mirror/openmw-tes3mp
Swap the terrain cache update order to make more sense
This commit is contained in:
parent
9f729667fb
commit
98c5e072f2
1 changed files with 11 additions and 11 deletions
|
@ -260,17 +260,6 @@ void TerrainGrid::unloadCell(int x, int y)
|
|||
|
||||
void TerrainGrid::updateCache()
|
||||
{
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mTextureCacheMutex);
|
||||
for (TextureCache::iterator it = mTextureCache.begin(); it != mTextureCache.end();)
|
||||
{
|
||||
if (it->second->referenceCount() <= 1)
|
||||
mTextureCache.erase(it++);
|
||||
else
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mGridCacheMutex);
|
||||
for (Grid::iterator it = mGridCache.begin(); it != mGridCache.end();)
|
||||
|
@ -281,6 +270,17 @@ void TerrainGrid::updateCache()
|
|||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mTextureCacheMutex);
|
||||
for (TextureCache::iterator it = mTextureCache.begin(); it != mTextureCache.end();)
|
||||
{
|
||||
if (it->second->referenceCount() <= 1)
|
||||
mTextureCache.erase(it++);
|
||||
else
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue