forked from teamnwah/openmw-tes3coop
Reset player position when spawning in fallback cell
This commit is contained in:
parent
4773d754c6
commit
18b3e71be5
1 changed files with 4 additions and 0 deletions
|
@ -253,6 +253,10 @@ namespace MWWorld
|
|||
catch (...)
|
||||
{
|
||||
// Cell no longer exists. Place the player in a default cell.
|
||||
ESM::Position pos = mPlayer.mData.getPosition();
|
||||
MWBase::Environment::get().getWorld()->indexToPosition(0, 0, pos.pos[0], pos.pos[1], true);
|
||||
pos.pos[2] = 0;
|
||||
mPlayer.mData.setPosition(pos);
|
||||
mCellStore = world.getExterior(0,0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue