mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 00:35:23 +00:00
Merge remote-tracking branch 'scrawl/master'
This commit is contained in:
commit
8b3e852ffc
@ -516,12 +516,12 @@ namespace MWMechanics
|
||||
}
|
||||
}
|
||||
|
||||
void Actors::dropActors (const MWWorld::Ptr::CellStore *cellStore)
|
||||
void Actors::dropActors (const MWWorld::Ptr::CellStore *cellStore, const MWWorld::Ptr& ignore)
|
||||
{
|
||||
PtrControllerMap::iterator iter = mActors.begin();
|
||||
while(iter != mActors.end())
|
||||
{
|
||||
if(iter->first.getCell()==cellStore)
|
||||
if(iter->first.getCell()==cellStore && iter->first != ignore)
|
||||
{
|
||||
delete iter->second;
|
||||
mActors.erase(iter++);
|
||||
|
@ -68,8 +68,8 @@ namespace MWMechanics
|
||||
void updateActor(const MWWorld::Ptr &old, const MWWorld::Ptr& ptr);
|
||||
///< Updates an actor with a new Ptr
|
||||
|
||||
void dropActors (const MWWorld::CellStore *cellStore);
|
||||
///< Deregister all actors in the given cell.
|
||||
void dropActors (const MWWorld::CellStore *cellStore, const MWWorld::Ptr& ignore);
|
||||
///< Deregister all actors (except for \a ignore) in the given cell.
|
||||
|
||||
void update (float duration, bool paused);
|
||||
///< Update actor stats and store desired velocity vectors in \a movement
|
||||
|
@ -200,10 +200,7 @@ namespace MWMechanics
|
||||
|
||||
void MechanicsManager::drop(const MWWorld::CellStore *cellStore)
|
||||
{
|
||||
if(!mWatched.isEmpty() && mWatched.getCell() == cellStore)
|
||||
mWatched = MWWorld::Ptr();
|
||||
|
||||
mActors.dropActors(cellStore);
|
||||
mActors.dropActors(cellStore, mWatched);
|
||||
mObjects.dropObjects(cellStore);
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,9 @@ namespace MWWorld
|
||||
mRendering.removeCell(*iter);
|
||||
|
||||
MWBase::Environment::get().getWorld()->getLocalScripts().clearCell (*iter);
|
||||
|
||||
MWBase::Environment::get().getMechanicsManager()->drop (*iter);
|
||||
|
||||
MWBase::Environment::get().getSoundManager()->stopSound (*iter);
|
||||
mActiveCells.erase(*iter);
|
||||
}
|
||||
@ -164,6 +166,7 @@ namespace MWWorld
|
||||
void Scene::playerCellChange(MWWorld::CellStore *cell, const ESM::Position& pos, bool adjustPlayerPos)
|
||||
{
|
||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||
MWWorld::Ptr old = world->getPlayer().getPlayer();
|
||||
world->getPlayer().setCell(cell);
|
||||
|
||||
MWWorld::Ptr player = world->getPlayer().getPlayer();
|
||||
@ -183,7 +186,7 @@ namespace MWWorld
|
||||
MWBase::MechanicsManager *mechMgr =
|
||||
MWBase::Environment::get().getMechanicsManager();
|
||||
|
||||
mechMgr->add(player);
|
||||
mechMgr->updateCell(old, player);
|
||||
mechMgr->watchActor(player);
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->changeCell(mCurrentCell);
|
||||
@ -205,9 +208,6 @@ namespace MWWorld
|
||||
Loading::Listener* loadingListener = MWBase::Environment::get().getWindowManager()->getLoadingScreen();
|
||||
Loading::ScopedLoad load(loadingListener);
|
||||
|
||||
// remove active
|
||||
MWBase::Environment::get().getMechanicsManager()->remove(MWBase::Environment::get().getWorld()->getPlayer().getPlayer());
|
||||
|
||||
std::string loadingExteriorText = "#{sLoadingMessage3}";
|
||||
loadingListener->setLabel(loadingExteriorText);
|
||||
|
||||
|
@ -889,7 +889,7 @@ namespace MWWorld
|
||||
int cellY = newCell.mCell->getGridY();
|
||||
mWorldScene->changeCell(cellX, cellY, pos, false);
|
||||
}
|
||||
addContainerScripts (ptr, &newCell);
|
||||
addContainerScripts (getPlayer().getPlayer(), &newCell);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user