move 'player' record to dynamic

This commit is contained in:
greye 2012-11-06 18:17:32 +04:00
parent 83f5b1df81
commit 58b7927a36

View file

@ -95,6 +95,16 @@ void ESMStore::setUp()
mSkills.setUp();
mMagicEffects.setUp();
mAttributes.setUp();
ESM::NPC item;
item.mId = "player";
std::vector<ESM::NPC>::iterator pIt =
std::lower_bound(mNpcs.mStatic.begin(), mNpcs.mStatic.end(), item, RecordCmp());
assert(pIt != mNpcs.mStatic.end() && pIt->mId == "player");
mNpcs.insert(*pIt);
mNpcs.mStatic.erase(pIt);
}
} // end namespace