From 16b5cadd9e0560676ee7b8a346c24480f865db7b Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 6 Mar 2017 20:45:46 +0100 Subject: [PATCH] Fix order of operations w.r.t clearing cache --- components/terrain/world.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/terrain/world.cpp b/components/terrain/world.cpp index 0073032439..9c3d08687f 100644 --- a/components/terrain/world.cpp +++ b/components/terrain/world.cpp @@ -27,16 +27,16 @@ World::World(osg::Group* parent, Resource::ResourceSystem* resourceSystem, osgUt mParent->addChild(mTerrainRoot); mTextureManager.reset(new TextureManager(mResourceSystem->getSceneManager())); - mResourceSystem->addResourceManager(mTextureManager.get()); - mChunkManager.reset(new ChunkManager(mStorage, mResourceSystem->getSceneManager(), mTextureManager.get())); + mResourceSystem->addResourceManager(mChunkManager.get()); + mResourceSystem->addResourceManager(mTextureManager.get()); } World::~World() { - mResourceSystem->removeResourceManager(mTextureManager.get()); mResourceSystem->removeResourceManager(mChunkManager.get()); + mResourceSystem->removeResourceManager(mTextureManager.get()); mParent->removeChild(mTerrainRoot);