forked from teamnwah/openmw-tes3coop
Savegame: start in (0,0) cell if player's cell no longer exists
This happens frequently when saves are loaded that were created in a different MW language.
This commit is contained in:
parent
b25026299c
commit
2d17d8f61a
1 changed files with 9 additions and 1 deletions
|
@ -246,7 +246,15 @@ namespace MWWorld
|
||||||
|
|
||||||
MWBase::World& world = *MWBase::Environment::get().getWorld();
|
MWBase::World& world = *MWBase::Environment::get().getWorld();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
mCellStore = world.getCell (player.mCellId);
|
mCellStore = world.getCell (player.mCellId);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
// Cell no longer exists. Place the player in a default cell.
|
||||||
|
mCellStore = world.getExterior(0,0);
|
||||||
|
}
|
||||||
|
|
||||||
if (!player.mBirthsign.empty() &&
|
if (!player.mBirthsign.empty() &&
|
||||||
!world.getStore().get<ESM::BirthSign>().search (player.mBirthsign))
|
!world.getStore().get<ESM::BirthSign>().search (player.mBirthsign))
|
||||||
|
|
Loading…
Reference in a new issue