|
|
|
@ -2582,7 +2582,25 @@ namespace MWWorld
|
|
|
|
|
{
|
|
|
|
|
pos.rot[0] = pos.rot[1] = pos.rot[2] = 0;
|
|
|
|
|
|
|
|
|
|
if (const ESM::Cell *ext = getExterior(name)) {
|
|
|
|
|
const ESM::Cell *ext = getExterior(name);
|
|
|
|
|
|
|
|
|
|
if (!ext && name.find(',') != std::string::npos) {
|
|
|
|
|
try {
|
|
|
|
|
int x = std::stoi(name.substr(0, name.find(',')));
|
|
|
|
|
int y = std::stoi(name.substr(name.find(',')+1));
|
|
|
|
|
ext = getExterior(x, y)->getCell();
|
|
|
|
|
}
|
|
|
|
|
catch (std::invalid_argument)
|
|
|
|
|
{
|
|
|
|
|
// This exception can be ignored, as this means that name probably refers to a interior cell instead of comma separated coordinates
|
|
|
|
|
}
|
|
|
|
|
catch (std::out_of_range)
|
|
|
|
|
{
|
|
|
|
|
throw std::runtime_error("Cell coordinates out of range.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ext) {
|
|
|
|
|
int x = ext->getGridX();
|
|
|
|
|
int y = ext->getGridY();
|
|
|
|
|
indexToPosition(x, y, pos.pos[0], pos.pos[1], true);
|
|
|
|
@ -2592,6 +2610,7 @@ namespace MWWorld
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|