Fix dialogue insertion again

revert-6246b479
Evil Eye 1 year ago
parent cab47d0a2a
commit d3c1928f01

@ -24,14 +24,15 @@ namespace ESM
auto it = mInfoPositions.find(value.mId);
if (it != mInfoPositions.end() && it->second.mPosition->mPrev == value.mPrev)
if (it != mInfoPositions.end())
{
bool samePrev = it->second.mPosition->mPrev == value.mPrev;
*it->second.mPosition = std::forward<V>(value);
it->second.mDeleted = deleted;
return;
if (samePrev)
return;
}
if (it == mInfoPositions.end())
else
it = mInfoPositions.emplace(value.mId, Item{ .mPosition = mOrderedInfo.end(), .mDeleted = deleted })
.first;
@ -57,13 +58,6 @@ namespace ESM
return;
}
const auto nextIt = mInfoPositions.find(value.mNext);
if (nextIt != mInfoPositions.end())
{
insertOrSplice(nextIt->second.mPosition);
return;
}
insertOrSplice(mOrderedInfo.end());
}

Loading…
Cancel
Save