mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-20 18:39:39 +00:00
Don't erase the player
This commit is contained in:
parent
5e1960a76a
commit
e79036f4e0
1 changed files with 3 additions and 6 deletions
|
@ -80,8 +80,6 @@ namespace MWWorld
|
|||
|
||||
std::map<int, StoreBase *> mStores;
|
||||
|
||||
ESM::NPC mPlayerTemplate;
|
||||
|
||||
unsigned int mDynamicCount;
|
||||
|
||||
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)
|
||||
it->second->clearDynamic();
|
||||
|
||||
mNpcs.insert(mPlayerTemplate);
|
||||
movePlayerRecord();
|
||||
}
|
||||
|
||||
void movePlayerRecord ()
|
||||
{
|
||||
mPlayerTemplate = *mNpcs.find("player");
|
||||
mNpcs.eraseStatic(mPlayerTemplate.mId);
|
||||
mNpcs.insert(mPlayerTemplate);
|
||||
auto player = mNpcs.find("player");
|
||||
mNpcs.insert(*player);
|
||||
}
|
||||
|
||||
void load(ESM::ESMReader &esm, Loading::Listener* listener);
|
||||
|
|
Loading…
Reference in a new issue