mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Merge remote-tracking branch 'scrawl/master'
This commit is contained in:
commit
f56debdb11
1 changed files with 12 additions and 6 deletions
|
@ -63,6 +63,8 @@ void Dialogue::readInfo(ESMReader &esm, bool merge)
|
||||||
std::map<std::string, ESM::Dialogue::InfoContainer::iterator>::iterator lookup;
|
std::map<std::string, ESM::Dialogue::InfoContainer::iterator>::iterator lookup;
|
||||||
|
|
||||||
lookup = mLookup.find(id);
|
lookup = mLookup.find(id);
|
||||||
|
|
||||||
|
ESM::DialInfo info;
|
||||||
if (lookup != mLookup.end())
|
if (lookup != mLookup.end())
|
||||||
{
|
{
|
||||||
it = lookup->second;
|
it = lookup->second;
|
||||||
|
@ -70,13 +72,17 @@ void Dialogue::readInfo(ESMReader &esm, bool merge)
|
||||||
// Merge with existing record. Only the subrecords that are present in
|
// Merge with existing record. Only the subrecords that are present in
|
||||||
// the new record will be overwritten.
|
// the new record will be overwritten.
|
||||||
it->load(esm);
|
it->load(esm);
|
||||||
return;
|
info = *it;
|
||||||
}
|
|
||||||
|
|
||||||
// New record
|
// Since the record merging may have changed the next/prev linked list connection, we need to re-insert the record
|
||||||
ESM::DialInfo info;
|
mInfo.erase(it);
|
||||||
info.mId = id;
|
mLookup.erase(lookup);
|
||||||
info.load(esm);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
info.mId = id;
|
||||||
|
info.load(esm);
|
||||||
|
}
|
||||||
|
|
||||||
if (info.mNext.empty())
|
if (info.mNext.empty())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue