mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 21:35:24 +00:00
Print the missing player cell to error output
This commit is contained in:
parent
8286dc6c5a
commit
7900631d51
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
#include "player.hpp"
|
#include "player.hpp"
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include <components/esm/esmreader.hpp>
|
#include <components/esm/esmreader.hpp>
|
||||||
#include <components/esm/esmwriter.hpp>
|
#include <components/esm/esmwriter.hpp>
|
||||||
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include "../mwmechanics/movement.hpp"
|
#include "../mwmechanics/movement.hpp"
|
||||||
#include "../mwmechanics/npcstats.hpp"
|
#include "../mwmechanics/npcstats.hpp"
|
||||||
#include "../mwmechanics/actors.hpp"
|
|
||||||
|
|
||||||
#include "class.hpp"
|
#include "class.hpp"
|
||||||
#include "ptr.hpp"
|
#include "ptr.hpp"
|
||||||
@ -327,6 +326,7 @@ namespace MWWorld
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
std::cerr << "Player cell '" << player.mCellId.mWorldspace << "' no longer exists" << std::endl;
|
||||||
// Cell no longer exists. Place the player in a default cell.
|
// Cell no longer exists. Place the player in a default cell.
|
||||||
ESM::Position pos = mPlayer.mData.getPosition();
|
ESM::Position pos = mPlayer.mData.getPosition();
|
||||||
MWBase::Environment::get().getWorld()->indexToPosition(0, 0, pos.pos[0], pos.pos[1], true);
|
MWBase::Environment::get().getWorld()->indexToPosition(0, 0, pos.pos[0], pos.pos[1], true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user