From afa84b72e036cc903f33ba741b0b63c6c3b42cf9 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 3 Sep 2011 10:26:31 +0200 Subject: [PATCH] fixed exterior bug --- apps/openmw/mwworld/scene.cpp | 6 +++--- apps/openmw/mwworld/scene.hpp | 4 ++-- apps/openmw/mwworld/world.cpp | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index f7ad72cdd6..339cf31946 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -59,8 +59,8 @@ namespace MWWorld mWorld->removeScripts (iter->first); - mEnvironment.mMechanicsManager->dropActors (iter->first); // FIXME: gehört in world? - mEnvironment.mSoundManager->stopSound (iter->first); // FIXME: same + mEnvironment.mMechanicsManager->dropActors (iter->first); + mEnvironment.mSoundManager->stopSound (iter->first); delete iter->second; mActiveCells.erase (iter); } @@ -187,7 +187,7 @@ namespace MWWorld return mCellChanged; } - std::map Scene::getActiveCells () + const std::map& Scene::getActiveCells () { return mActiveCells; } diff --git a/apps/openmw/mwworld/scene.hpp b/apps/openmw/mwworld/scene.hpp index 7e193de2af..0455ade00d 100644 --- a/apps/openmw/mwworld/scene.hpp +++ b/apps/openmw/mwworld/scene.hpp @@ -84,7 +84,7 @@ namespace MWWorld Ptr::CellStore* getCurrentCell (); - CellRenderCollection getActiveCells (); + const CellRenderCollection& getActiveCells (); bool hasCellChanged() const; ///< Has the player moved to a different cell, since the last frame? @@ -98,7 +98,7 @@ namespace MWWorld void markCellAsUnchanged(); std::string getFacedHandle(); - + void insertCell(ESMS::CellStore &cell); }; } diff --git a/apps/openmw/mwworld/world.cpp b/apps/openmw/mwworld/world.cpp index 71b37e1ff6..134662f54d 100644 --- a/apps/openmw/mwworld/world.cpp +++ b/apps/openmw/mwworld/world.cpp @@ -219,7 +219,7 @@ namespace MWWorld MWRender::CellRender *World::searchRender (Ptr::CellStore *store) { - CellRenderCollection::iterator iter = mWorldScene->getActiveCells().find (store); + CellRenderCollection::const_iterator iter = mWorldScene->getActiveCells().find (store); if (iter!=mWorldScene->getActiveCells().end()) { @@ -405,7 +405,7 @@ namespace MWWorld } // active cells - for (CellRenderCollection::iterator iter (mWorldScene->getActiveCells().begin()); + for (CellRenderCollection::const_iterator iter (mWorldScene->getActiveCells().begin()); iter!=mWorldScene->getActiveCells().end(); ++iter) { Ptr ptr = getPtr (name, *iter->first); @@ -427,7 +427,7 @@ namespace MWWorld if (mPlayer->getPlayer().getRefData().getHandle()==handle) return mPlayer->getPlayer(); - for (CellRenderCollection::iterator iter (mWorldScene->getActiveCells().begin()); + for (CellRenderCollection::const_iterator iter (mWorldScene->getActiveCells().begin()); iter!=mWorldScene->getActiveCells().end(); ++iter) { Ptr ptr = getPtrViaHandle (handle, *iter->first); @@ -720,6 +720,7 @@ namespace MWWorld float duration) { std::vector< std::pair > vectors = mPhysics->doPhysics (duration, actors); + std::vector< std::pair >::iterator player = vectors.end(); for (std::vector< std::pair >::iterator it = vectors.begin();