mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-10 15:45:37 +00:00
Don't erase the player
This commit is contained in:
parent
5e1960a76a
commit
e79036f4e0
@ -80,8 +80,6 @@ namespace MWWorld
|
|||||||
|
|
||||||
std::map<int, StoreBase *> mStores;
|
std::map<int, StoreBase *> mStores;
|
||||||
|
|
||||||
ESM::NPC mPlayerTemplate;
|
|
||||||
|
|
||||||
unsigned int mDynamicCount;
|
unsigned int mDynamicCount;
|
||||||
|
|
||||||
mutable std::map<std::string, std::weak_ptr<MWMechanics::SpellList> > mSpellListCache;
|
mutable std::map<std::string, std::weak_ptr<MWMechanics::SpellList> > mSpellListCache;
|
||||||
@ -172,14 +170,13 @@ namespace MWWorld
|
|||||||
for (std::map<int, StoreBase *>::iterator it = mStores.begin(); it != mStores.end(); ++it)
|
for (std::map<int, StoreBase *>::iterator it = mStores.begin(); it != mStores.end(); ++it)
|
||||||
it->second->clearDynamic();
|
it->second->clearDynamic();
|
||||||
|
|
||||||
mNpcs.insert(mPlayerTemplate);
|
movePlayerRecord();
|
||||||
}
|
}
|
||||||
|
|
||||||
void movePlayerRecord ()
|
void movePlayerRecord ()
|
||||||
{
|
{
|
||||||
mPlayerTemplate = *mNpcs.find("player");
|
auto player = mNpcs.find("player");
|
||||||
mNpcs.eraseStatic(mPlayerTemplate.mId);
|
mNpcs.insert(*player);
|
||||||
mNpcs.insert(mPlayerTemplate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void load(ESM::ESMReader &esm, Loading::Listener* listener);
|
void load(ESM::ESMReader &esm, Loading::Listener* listener);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user