From a2d043f43a31195acd357f937a9cc8d9c5534b26 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Sat, 27 Sep 2014 23:36:27 +1000 Subject: [PATCH] Re-check unknown record id after loading. --- apps/opencs/model/world/idcollection.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/opencs/model/world/idcollection.hpp b/apps/opencs/model/world/idcollection.hpp index 7e7756ff3e..940181c24b 100644 --- a/apps/opencs/model/world/idcollection.hpp +++ b/apps/opencs/model/world/idcollection.hpp @@ -71,6 +71,14 @@ namespace CSMWorld record.load (reader); + if (index==-1) + { + std::string newId = IdAccessorT().getId(record); + int newIndex = this->searchId(newId); + if (newIndex != -1 && id != newId) + index = newIndex; + } + load (record, base, index); } }