1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-01 14:06:43 +00:00

Merge branch 'dial_early' into 'master'

Add an early out to dialogue loading to match Morrowind.exe behaviour

Closes #7080

See merge request OpenMW/openmw!2524
This commit is contained in:
psi29a 2022-11-28 07:57:19 +00:00
commit 199f4ccae4

View file

@ -87,8 +87,14 @@ namespace ESM
if (lookup != mLookup.end())
{
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
if (it->mPrev == info.mPrev)
{
*it = info;
lookup->second.second = isDeleted;
return;
}
// Since the new version of this record has a different prev linked list connection, we need to re-insert
// the record
mInfo.erase(it);
mLookup.erase(lookup);
}