1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Print the missing player cell to error output

This commit is contained in:
scrawl 2015-07-19 16:39:22 +02:00
parent 8286dc6c5a
commit 7900631d51

View File

@ -1,7 +1,7 @@
#include "player.hpp"
#include <stdexcept>
#include <iostream>
#include <components/esm/esmreader.hpp>
#include <components/esm/esmwriter.hpp>
@ -19,7 +19,6 @@
#include "../mwmechanics/movement.hpp"
#include "../mwmechanics/npcstats.hpp"
#include "../mwmechanics/actors.hpp"
#include "class.hpp"
#include "ptr.hpp"
@ -327,6 +326,7 @@ namespace MWWorld
}
catch (...)
{
std::cerr << "Player cell '" << player.mCellId.mWorldspace << "' no longer exists" << std::endl;
// 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);