1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

fixed exterior bug

This commit is contained in:
Marc Zinnschlag 2011-09-03 10:26:31 +02:00
parent 0a2979caf2
commit afa84b72e0
3 changed files with 9 additions and 8 deletions

View File

@ -59,8 +59,8 @@ namespace MWWorld
mWorld->removeScripts (iter->first); mWorld->removeScripts (iter->first);
mEnvironment.mMechanicsManager->dropActors (iter->first); // FIXME: gehört in world? mEnvironment.mMechanicsManager->dropActors (iter->first);
mEnvironment.mSoundManager->stopSound (iter->first); // FIXME: same mEnvironment.mSoundManager->stopSound (iter->first);
delete iter->second; delete iter->second;
mActiveCells.erase (iter); mActiveCells.erase (iter);
} }
@ -187,7 +187,7 @@ namespace MWWorld
return mCellChanged; return mCellChanged;
} }
std::map<Ptr::CellStore *, MWRender::CellRender *> Scene::getActiveCells () const std::map<Ptr::CellStore *, MWRender::CellRender *>& Scene::getActiveCells ()
{ {
return mActiveCells; return mActiveCells;
} }

View File

@ -84,7 +84,7 @@ namespace MWWorld
Ptr::CellStore* getCurrentCell (); Ptr::CellStore* getCurrentCell ();
CellRenderCollection getActiveCells (); const CellRenderCollection& getActiveCells ();
bool hasCellChanged() const; bool hasCellChanged() const;
///< Has the player moved to a different cell, since the last frame? ///< Has the player moved to a different cell, since the last frame?
@ -98,7 +98,7 @@ namespace MWWorld
void markCellAsUnchanged(); void markCellAsUnchanged();
std::string getFacedHandle(); std::string getFacedHandle();
void insertCell(ESMS::CellStore<MWWorld::RefData> &cell); void insertCell(ESMS::CellStore<MWWorld::RefData> &cell);
}; };
} }

View File

@ -219,7 +219,7 @@ namespace MWWorld
MWRender::CellRender *World::searchRender (Ptr::CellStore *store) 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()) if (iter!=mWorldScene->getActiveCells().end())
{ {
@ -405,7 +405,7 @@ namespace MWWorld
} }
// active cells // active cells
for (CellRenderCollection::iterator iter (mWorldScene->getActiveCells().begin()); for (CellRenderCollection::const_iterator iter (mWorldScene->getActiveCells().begin());
iter!=mWorldScene->getActiveCells().end(); ++iter) iter!=mWorldScene->getActiveCells().end(); ++iter)
{ {
Ptr ptr = getPtr (name, *iter->first); Ptr ptr = getPtr (name, *iter->first);
@ -427,7 +427,7 @@ namespace MWWorld
if (mPlayer->getPlayer().getRefData().getHandle()==handle) if (mPlayer->getPlayer().getRefData().getHandle()==handle)
return mPlayer->getPlayer(); return mPlayer->getPlayer();
for (CellRenderCollection::iterator iter (mWorldScene->getActiveCells().begin()); for (CellRenderCollection::const_iterator iter (mWorldScene->getActiveCells().begin());
iter!=mWorldScene->getActiveCells().end(); ++iter) iter!=mWorldScene->getActiveCells().end(); ++iter)
{ {
Ptr ptr = getPtrViaHandle (handle, *iter->first); Ptr ptr = getPtrViaHandle (handle, *iter->first);
@ -720,6 +720,7 @@ namespace MWWorld
float duration) float duration)
{ {
std::vector< std::pair<std::string, Ogre::Vector3> > vectors = mPhysics->doPhysics (duration, actors); std::vector< std::pair<std::string, Ogre::Vector3> > vectors = mPhysics->doPhysics (duration, actors);
std::vector< std::pair<std::string, Ogre::Vector3> >::iterator player = vectors.end(); std::vector< std::pair<std::string, Ogre::Vector3> >::iterator player = vectors.end();
for (std::vector< std::pair<std::string, Ogre::Vector3> >::iterator it = vectors.begin(); for (std::vector< std::pair<std::string, Ogre::Vector3> >::iterator it = vectors.begin();