From ea43a2350532ab0693d20459bc399fdff5e716d7 Mon Sep 17 00:00:00 2001 From: Ragora Date: Thu, 11 Sep 2014 20:45:22 -0400 Subject: [PATCH] All GMST logic is done in itemmodel.cpp now with usage of a static cache std::map --- apps/openmw/mwbase/world.hpp | 3 --- apps/openmw/mwworld/worldimp.cpp | 33 -------------------------------- apps/openmw/mwworld/worldimp.hpp | 3 --- 3 files changed, 39 deletions(-) diff --git a/apps/openmw/mwbase/world.hpp b/apps/openmw/mwbase/world.hpp index 85f2116e6e..f07bb3eb9b 100644 --- a/apps/openmw/mwbase/world.hpp +++ b/apps/openmw/mwbase/world.hpp @@ -220,9 +220,6 @@ namespace MWBase virtual int getMonth() const = 0; virtual int getYear() const = 0; - virtual bool isBoundItemID(const std::string &id) = 0; - /// \return Returns whether or not the id refers to a bound item. - virtual std::string getMonthName (int month = -1) const = 0; ///< Return name of month (-1: current month) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index bc8c314ca3..615b072e1b 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -191,29 +191,6 @@ namespace MWWorld mGlobalVariables.fill (mStore); mWorldScene = new Scene(*mRendering, mPhysics); - - // Build a list of known bound item ID's - const MWWorld::Store &gameSettings = mStore.get(); - - for (MWWorld::Store::iterator currentIteration = gameSettings.begin(); currentIteration != gameSettings.end(); ++currentIteration) - { - const ESM::GameSetting ¤tSetting = *currentIteration; - try - { - std::string currentGMSTID = currentSetting.mId; - std::transform(currentGMSTID.begin(), currentGMSTID.end(), currentGMSTID.begin(), ::tolower); - - // Don't bother checking this GMST if it's not a sMagicBound* one. - if (currentGMSTID.find("smagicbound") != 0) - continue; - - std::string currentGMSTValue = currentSetting.getString(); - std::transform(currentGMSTValue.begin(), currentGMSTValue.end(), currentGMSTValue.begin(), ::tolower); - - mBoundID[currentGMSTValue] = true; - } - catch(...){} - } } void World::startNewGame (bool bypass) @@ -902,16 +879,6 @@ namespace MWWorld return mGlobalVariables["timescale"].getFloat(); } - bool World::isBoundItemID(const std::string &id) - { - std::string id_temp = id; - std::transform(id_temp.begin(), id_temp.end(), id_temp.begin(), ::tolower); - - if (mBoundID.count(id_temp) != 0) - return true; - return false; - } - void World::changeToInteriorCell (const std::string& cellName, const ESM::Position& position) { mPhysics->clearQueuedMovement(); diff --git a/apps/openmw/mwworld/worldimp.hpp b/apps/openmw/mwworld/worldimp.hpp index bc85ab199d..94224e9a51 100644 --- a/apps/openmw/mwworld/worldimp.hpp +++ b/apps/openmw/mwworld/worldimp.hpp @@ -310,9 +310,6 @@ namespace MWWorld virtual float getTimeScaleFactor() const; - virtual bool isBoundItemID(const std::string &id); - ///< \return Whether or not the specified id refers to a bound item. - virtual void changeToInteriorCell (const std::string& cellName, const ESM::Position& position); ///< Move to interior cell.