forked from mirror/openmw-tes3mp
setting up
This commit is contained in:
parent
18bb5960e4
commit
dccc157f4c
3 changed files with 7 additions and 2 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue