@ -60,8 +60,8 @@ void ESMStore::load(ESM::ESMReader &esm)
if (n.val==ESM::REC_DIAL) {
// dirty hack, but it is better than non-const search()
// or friends
dialogue = const_cast<ESM::Dialogue *>(mDialogs.search(id));
assert (dialogue != NULL);
dialogue = &mDialogs.mStatic.back();
assert (dialogue->mId == id);
} else {
dialogue = 0;
}
@ -80,6 +80,8 @@ namespace MWWorld
};
class ESMStore;
template <class T>
class Store : public StoreBase
{
@ -89,6 +91,8 @@ namespace MWWorld
typedef std::map<std::string, T> Dynamic;
friend class ESMStore;
public:
Store()
{}
@ -188,6 +188,7 @@ namespace MWWorld
mEsm.setEncoding(encoding);
mEsm.open (masterPath.string());
mStore.load (mEsm);
mStore.setUp();
mPlayer = new MWWorld::Player (mStore.get<ESM::NPC>().find ("player"), *this);
mRendering->attachCameraTo(mPlayer->getPlayer());