From 11c0e6382f34825bf09b327a4bd112afd2ed0aaa Mon Sep 17 00:00:00 2001 From: greye Date: Wed, 7 Nov 2012 15:41:59 +0400 Subject: [PATCH] make ESMStore setting up itself after loading --- apps/openmw/mwworld/esmstore.cpp | 1 + apps/openmw/mwworld/esmstore.hpp | 3 ++- apps/openmw/mwworld/worldimp.cpp | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/esmstore.cpp b/apps/openmw/mwworld/esmstore.cpp index d0f00fa3a..73f5185c9 100644 --- a/apps/openmw/mwworld/esmstore.cpp +++ b/apps/openmw/mwworld/esmstore.cpp @@ -84,6 +84,7 @@ void ESMStore::load(ESM::ESMReader &esm) cout << *it << " "; cout << endl; */ + setUp(); } void ESMStore::setUp() diff --git a/apps/openmw/mwworld/esmstore.hpp b/apps/openmw/mwworld/esmstore.hpp index 46c156ffb..0a6ea01b3 100644 --- a/apps/openmw/mwworld/esmstore.hpp +++ b/apps/openmw/mwworld/esmstore.hpp @@ -139,7 +139,6 @@ namespace MWWorld } void load(ESM::ESMReader &esm); - void setUp(); template const Store &get() const { @@ -164,6 +163,8 @@ namespace MWWorld return ptr; } + private: + void setUp(); }; template <> diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 00f16743c..a482a9317 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -188,7 +188,6 @@ namespace MWWorld mEsm.setEncoding(encoding); mEsm.open (masterPath.string()); mStore.load (mEsm); - mStore.setUp(); mPlayer = new MWWorld::Player (mStore.get().find ("player"), *this); mRendering->attachCameraTo(mPlayer->getPlayer());