forked from mirror/openmw-tes3mp
[Client] If in a container, don't crash when teleported to another cell
This commit is contained in:
parent
f5470e0b49
commit
bf2f932e18
1 changed files with 6 additions and 0 deletions
|
@ -798,6 +798,12 @@ void LocalPlayer::setCell()
|
|||
MWWorld::Ptr player = world->getPlayerPtr();
|
||||
ESM::Position pos;
|
||||
|
||||
// To avoid crashes, close any container menus this player may be in
|
||||
if (MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_Container))
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Container);
|
||||
}
|
||||
|
||||
world->getPlayer().setTeleported(true);
|
||||
|
||||
int x = cell.mData.mX;
|
||||
|
|
Loading…
Reference in a new issue