1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 09:39:43 +00:00

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

This commit is contained in:
Evil Eye 2022-11-27 22:23:35 +01:00
parent f7f1832933
commit bbbcc5e4b7

View file

@ -87,8 +87,14 @@ namespace ESM
if (lookup != mLookup.end()) if (lookup != mLookup.end())
{ {
auto 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 if (it->mPrev == info.mPrev)
// re-insert the record {
*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); mInfo.erase(it);
mLookup.erase(lookup); mLookup.erase(lookup);
} }