From 69c2c4fcc170d4b82b5de0cdc5f36df2dbef0994 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 3 Feb 2016 19:12:46 +0100 Subject: [PATCH] updateMergedRefs before reading MVRF tags (Fixes #3161) --- apps/openmw/mwworld/cellstore.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/cellstore.cpp b/apps/openmw/mwworld/cellstore.cpp index 5b53643e8..5c8d07f86 100644 --- a/apps/openmw/mwworld/cellstore.cpp +++ b/apps/openmw/mwworld/cellstore.cpp @@ -807,6 +807,10 @@ namespace MWWorld } } + // Do another update here to make sure objects referred to by MVRF tags can be found + // This update is only needed for old saves that used the old copy&delete way of moving objects + updateMergedRefs(); + while (reader.isNextSub("MVRF")) { reader.cacheSubName(); @@ -848,8 +852,6 @@ namespace MWWorld moveTo(MWWorld::Ptr(movedRef, this), otherCell); } - - updateMergedRefs(); } bool operator== (const CellStore& left, const CellStore& right)