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