mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Improve PositionCell warning message
This commit is contained in:
parent
4b0ecaa0a0
commit
45a609bc54
@ -300,14 +300,16 @@ namespace MWScript
|
||||
}
|
||||
catch(std::exception&)
|
||||
{
|
||||
// cell not found, move to exterior instead (vanilla PositionCell compatibility)
|
||||
const ESM::Cell* cell = MWBase::Environment::get().getWorld()->getExterior(cellID);
|
||||
int cx,cy;
|
||||
MWBase::Environment::get().getWorld()->positionToIndex(x,y,cx,cy);
|
||||
store = MWBase::Environment::get().getWorld()->getExterior(cx,cy);
|
||||
if(!cell)
|
||||
{
|
||||
runtime.getContext().report ("unknown cell (" + cellID + ")");
|
||||
std::cerr << "unknown cell (" << cellID << ")\n";
|
||||
std::string error = "PositionCell: unknown interior cell (" + cellID + "), moving to exterior instead";
|
||||
runtime.getContext().report (error);
|
||||
std::cerr << error << std::endl;
|
||||
}
|
||||
}
|
||||
if(store)
|
||||
|
Loading…
x
Reference in New Issue
Block a user