From bd0a0e64a9d441c235c8320f28ec3aa82b296cd1 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 31 Jan 2015 01:44:49 +0100 Subject: [PATCH] Fix overwriting script records not working --- apps/openmw/mwworld/store.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/openmw/mwworld/store.hpp b/apps/openmw/mwworld/store.hpp index 929ff62a23..a155a37609 100644 --- a/apps/openmw/mwworld/store.hpp +++ b/apps/openmw/mwworld/store.hpp @@ -360,6 +360,8 @@ namespace MWWorld std::pair inserted = mStatic.insert(std::make_pair(scpt.mId, scpt)); if (inserted.second) mShared.push_back(&inserted.first->second); + else + inserted.first->second = scpt; } template <> @@ -371,6 +373,8 @@ namespace MWWorld std::pair inserted = mStatic.insert(std::make_pair(s.mId, s)); if (inserted.second) mShared.push_back(&inserted.first->second); + else + inserted.first->second = s; } template <>