mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 09:09:43 +00:00
Base dialogue order solely on mPrev
This commit is contained in:
parent
aa6cba9b17
commit
484a7c7b7e
2 changed files with 13 additions and 33 deletions
|
@ -279,6 +279,7 @@
|
||||||
Bug #6294: Game crashes with empty pathgrid
|
Bug #6294: Game crashes with empty pathgrid
|
||||||
Bug #6606: Quests with multiple IDs cannot always be restarted
|
Bug #6606: Quests with multiple IDs cannot always be restarted
|
||||||
Bug #6655: Constant effect absorb attribute causes the game to break
|
Bug #6655: Constant effect absorb attribute causes the game to break
|
||||||
|
Bug #6670: Dialogue order is incorrect
|
||||||
Feature #390: 3rd person look "over the shoulder"
|
Feature #390: 3rd person look "over the shoulder"
|
||||||
Feature #832: OpenMW-CS: Handle deleted references
|
Feature #832: OpenMW-CS: Handle deleted references
|
||||||
Feature #1536: Show more information about level on menu
|
Feature #1536: Show more information about level on menu
|
||||||
|
|
|
@ -86,49 +86,28 @@ namespace ESM
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
InfoContainer::iterator it = mInfo.end();
|
LookupMap::iterator lookup = mLookup.find(info.mId);
|
||||||
|
|
||||||
LookupMap::iterator lookup;
|
|
||||||
lookup = mLookup.find(info.mId);
|
|
||||||
|
|
||||||
if (lookup != mLookup.end())
|
if (lookup != mLookup.end())
|
||||||
{
|
{
|
||||||
it = lookup->second.first;
|
auto it = lookup->second.first;
|
||||||
// Since the new version of this record may have changed the next/prev linked list connection, we need to re-insert the record
|
// Since the new version of this record may have changed the next/prev linked list connection, we need to re-insert the record
|
||||||
mInfo.erase(it);
|
mInfo.erase(it);
|
||||||
mLookup.erase(lookup);
|
mLookup.erase(lookup);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.mNext.empty())
|
if (!info.mPrev.empty())
|
||||||
{
|
{
|
||||||
mLookup[info.mId] = std::make_pair(mInfo.insert(mInfo.end(), info), isDeleted);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (info.mPrev.empty())
|
|
||||||
{
|
|
||||||
mLookup[info.mId] = std::make_pair(mInfo.insert(mInfo.begin(), info), isDeleted);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
lookup = mLookup.find(info.mPrev);
|
lookup = mLookup.find(info.mPrev);
|
||||||
if (lookup != mLookup.end())
|
if (lookup != mLookup.end())
|
||||||
{
|
{
|
||||||
it = lookup->second.first;
|
auto it = lookup->second.first;
|
||||||
|
|
||||||
mLookup[info.mId] = std::make_pair(mInfo.insert(++it, info), isDeleted);
|
mLookup[info.mId] = std::make_pair(mInfo.insert(++it, info), isDeleted);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lookup = mLookup.find(info.mNext);
|
|
||||||
if (lookup != mLookup.end())
|
|
||||||
{
|
|
||||||
it = lookup->second.first;
|
|
||||||
|
|
||||||
mLookup[info.mId] = std::make_pair(mInfo.insert(it, info), isDeleted);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
mLookup[info.mId] = std::make_pair(mInfo.insert(mInfo.begin(), info), isDeleted);
|
||||||
Log(Debug::Warning) << "Warning: Failed to insert info " << info.mId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dialogue::clearDeletedInfos()
|
void Dialogue::clearDeletedInfos()
|
||||||
|
|
Loading…
Reference in a new issue