1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00

Use correct exterior cell when positioning

This commit is contained in:
Evil Eye 2023-02-06 16:36:45 +01:00
parent 4032c447e9
commit 97c6d25d54

View File

@ -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&)
{