forked from mirror/openmw-tes3mp
Fix order of operations w.r.t clearing cache
This commit is contained in:
parent
2c68ed4fb4
commit
16b5cadd9e
1 changed files with 3 additions and 3 deletions
|
@ -27,16 +27,16 @@ World::World(osg::Group* parent, Resource::ResourceSystem* resourceSystem, osgUt
|
||||||
mParent->addChild(mTerrainRoot);
|
mParent->addChild(mTerrainRoot);
|
||||||
|
|
||||||
mTextureManager.reset(new TextureManager(mResourceSystem->getSceneManager()));
|
mTextureManager.reset(new TextureManager(mResourceSystem->getSceneManager()));
|
||||||
mResourceSystem->addResourceManager(mTextureManager.get());
|
|
||||||
|
|
||||||
mChunkManager.reset(new ChunkManager(mStorage, mResourceSystem->getSceneManager(), mTextureManager.get()));
|
mChunkManager.reset(new ChunkManager(mStorage, mResourceSystem->getSceneManager(), mTextureManager.get()));
|
||||||
|
|
||||||
mResourceSystem->addResourceManager(mChunkManager.get());
|
mResourceSystem->addResourceManager(mChunkManager.get());
|
||||||
|
mResourceSystem->addResourceManager(mTextureManager.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
World::~World()
|
World::~World()
|
||||||
{
|
{
|
||||||
mResourceSystem->removeResourceManager(mTextureManager.get());
|
|
||||||
mResourceSystem->removeResourceManager(mChunkManager.get());
|
mResourceSystem->removeResourceManager(mChunkManager.get());
|
||||||
|
mResourceSystem->removeResourceManager(mTextureManager.get());
|
||||||
|
|
||||||
mParent->removeChild(mTerrainRoot);
|
mParent->removeChild(mTerrainRoot);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue