Use correct exterior cell when positioning

7220-lua-add-a-general-purpose-lexical-parser
Evil Eye 2 years ago
parent 4032c447e9
commit 97c6d25d54

@ -400,6 +400,11 @@ namespace MWScript
try
{
store = worldModel->getCell(cellID);
if (store->isExterior())
{
const osg::Vec2i cellIndex = MWWorld::positionToCellIndex(x, y);
store = worldModel->getExterior(cellIndex.x(), cellIndex.y());
}
}
catch (std::exception&)
{

Loading…
Cancel
Save