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