mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-14 01:19:59 +00:00
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
@ -246,7 +246,15 @@ namespace MWWorld
|
||||
|
||||
MWBase::World& world = *MWBase::Environment::get().getWorld();
|
||||
|
||||
mCellStore = world.getCell (player.mCellId);
|
||||
try
|
||||
{
|
||||
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() &&
|
||||
!world.getStore().get<ESM::BirthSign>().search (player.mBirthsign))
|
||||
|
Loading…
x
Reference in New Issue
Block a user