mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 02:15:32 +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&)
|
||||
{
|
||||
// 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…
Reference in a new issue