From 04a68fc9765eb57c613f0054c9d8f5198d2699bd Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 11 Dec 2014 00:20:45 +0100 Subject: [PATCH] Revert "Implement overwriting pathgrid records" This broke pathgrid loading in exterior cells due to an unexpected problem in the pathgrid record system (bug #2195). This reverts commit dd0cea21b0ead17a13198f3e584d343c6bb31875. --- apps/openmw/mwworld/store.hpp | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/apps/openmw/mwworld/store.hpp b/apps/openmw/mwworld/store.hpp index 469b93f88e..55c5b8191f 100644 --- a/apps/openmw/mwworld/store.hpp +++ b/apps/openmw/mwworld/store.hpp @@ -876,36 +876,8 @@ namespace MWWorld public: void load(ESM::ESMReader &esm, const std::string &id) { - - ESM::Pathgrid pathgrid; - pathgrid.load(esm); - - // Try to overwrite existing record - // Can't use search() because we aren't sorted yet - if (!pathgrid.mCell.empty()) - { - for (std::vector::iterator it = mStatic.begin(); it != mStatic.end(); ++it) - { - if ((*it).mCell == pathgrid.mCell) - { - (*it) = pathgrid; - return; - } - } - } - else - { - for (std::vector::iterator it = mStatic.begin(); it != mStatic.end(); ++it) - { - if ((*it).mData.mX == pathgrid.mData.mX && (*it).mData.mY == pathgrid.mData.mY) - { - (*it) = pathgrid; - return; - } - } - } - - mStatic.push_back(pathgrid); + mStatic.push_back(ESM::Pathgrid()); + mStatic.back().load(esm); } size_t getSize() const {