From 189e4a6f6df66417e9a0fa1aa5bca45c4ff2c930 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Tue, 23 Dec 2025 23:24:28 +0100 Subject: [PATCH] Insert exterior cells created by moved refs into mSharedExt --- apps/openmw/mwworld/store.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwworld/store.cpp b/apps/openmw/mwworld/store.cpp index 01305b3d6e..9d030dcea9 100644 --- a/apps/openmw/mwworld/store.cpp +++ b/apps/openmw/mwworld/store.cpp @@ -597,9 +597,10 @@ namespace MWWorld newCell.mAmbi.mFogDensity = 0; newCell.updateId(); - ESM::Cell* newCellInserted = &mCells.insert(std::make_pair(newCell.mId, newCell)).first->second; - - return mExt.insert(std::make_pair(key, newCellInserted)).first->second; + ESM::Cell* newCellInserted = &mCells.emplace(newCell.mId, newCell).first->second; + mExt.emplace(key, newCellInserted); + mSharedExt.emplace_back(newCellInserted); + return newCellInserted; } const ESM::Cell* Store::find(const ESM::RefId& id) const {