mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 13:39:42 +00:00
Improve PositionCell warning message
This commit is contained in:
parent
4b0ecaa0a0
commit
45a609bc54
1 changed files with 4 additions and 2 deletions
|
@ -300,14 +300,16 @@ namespace MWScript
|
||||||
}
|
}
|
||||||
catch(std::exception&)
|
catch(std::exception&)
|
||||||
{
|
{
|
||||||
|
// cell not found, move to exterior instead (vanilla PositionCell compatibility)
|
||||||
const ESM::Cell* cell = MWBase::Environment::get().getWorld()->getExterior(cellID);
|
const ESM::Cell* cell = MWBase::Environment::get().getWorld()->getExterior(cellID);
|
||||||
int cx,cy;
|
int cx,cy;
|
||||||
MWBase::Environment::get().getWorld()->positionToIndex(x,y,cx,cy);
|
MWBase::Environment::get().getWorld()->positionToIndex(x,y,cx,cy);
|
||||||
store = MWBase::Environment::get().getWorld()->getExterior(cx,cy);
|
store = MWBase::Environment::get().getWorld()->getExterior(cx,cy);
|
||||||
if(!cell)
|
if(!cell)
|
||||||
{
|
{
|
||||||
runtime.getContext().report ("unknown cell (" + cellID + ")");
|
std::string error = "PositionCell: unknown interior cell (" + cellID + "), moving to exterior instead";
|
||||||
std::cerr << "unknown cell (" << cellID << ")\n";
|
runtime.getContext().report (error);
|
||||||
|
std::cerr << error << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(store)
|
if(store)
|
||||||
|
|
Loading…
Reference in a new issue