diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index 2a32856c1..66061e383 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -1333,7 +1333,7 @@ void LocalPlayer::clearCurrentContainer() currentContainer.mpNum = 0; } -void LocalPlayer::storeCellState(ESM::Cell cell, int stateType) +void LocalPlayer::storeCellState(const ESM::Cell& cell, int stateType) { std::vector::iterator iter; diff --git a/apps/openmw/mwmp/LocalPlayer.hpp b/apps/openmw/mwmp/LocalPlayer.hpp index babe9a4e0..592245cf1 100644 --- a/apps/openmw/mwmp/LocalPlayer.hpp +++ b/apps/openmw/mwmp/LocalPlayer.hpp @@ -84,8 +84,8 @@ namespace mwmp void clearCellStates(); void clearCurrentContainer(); - void storeCellState(ESM::Cell cell, int stateType); void storeCurrentContainer(const MWWorld::Ptr& container); + void storeCellState(const ESM::Cell& cell, int stateType); private: Networking *getNetworking(); diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index ae152646f..9c354f21d 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -261,16 +261,6 @@ namespace MWWorld mPhysics->removeHeightField ((*iter)->getCell()->getGridX(), (*iter)->getCell()->getGridY()); } - MWBase::Environment::get().getMechanicsManager()->drop (*iter); - - mRendering.removeCell(*iter); - MWBase::Environment::get().getWindowManager()->removeCell(*iter); - - MWBase::Environment::get().getWorld()->getLocalScripts().clearCell (*iter); - - MWBase::Environment::get().getSoundManager()->stopSound (*iter); - mActiveCells.erase(*iter); - /* Start of tes3mp addition @@ -280,6 +270,16 @@ namespace MWWorld /* End of tes3mp addition */ + + MWBase::Environment::get().getMechanicsManager()->drop (*iter); + + mRendering.removeCell(*iter); + MWBase::Environment::get().getWindowManager()->removeCell(*iter); + + MWBase::Environment::get().getWorld()->getLocalScripts().clearCell (*iter); + + MWBase::Environment::get().getSoundManager()->stopSound (*iter); + mActiveCells.erase(*iter); } void Scene::loadCell (CellStore *cell, Loading::Listener* loadingListener, bool respawn)