From 542c648e6986160c7590703a6c1811ec06e34c8a Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 22 Aug 2015 22:53:06 +0200 Subject: [PATCH] Fix incorrect assignment of PcRace, need to sort race IDs (Fixes #2884) --- apps/openmw/mwworld/store.hpp | 1 + apps/openmw/mwworld/worldimp.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/apps/openmw/mwworld/store.hpp b/apps/openmw/mwworld/store.hpp index 3cbd8d3ac9..47c87f742d 100644 --- a/apps/openmw/mwworld/store.hpp +++ b/apps/openmw/mwworld/store.hpp @@ -170,6 +170,7 @@ namespace MWWorld size_t getSize() const; int getDynamicSize() const; + /// @note The record identifiers are listed in the order that the records were defined by the content files. void listIdentifier(std::vector &list) const; T *insert(const T &item); diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 5b2624f4cf..8b53d16759 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1496,6 +1496,8 @@ namespace MWWorld std::vector ids; getStore().get().listIdentifier(ids); + std::sort(ids.begin(), ids.end()); + unsigned int i=0; for (; i