diff --git a/apps/openmw/mwworld/store.hpp b/apps/openmw/mwworld/store.hpp index 3cbd8d3ac..47c87f742 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 5b2624f4c..8b53d1675 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