mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 01:45:36 +00:00
Use correct exterior cell when positioning
This commit is contained in:
parent
4032c447e9
commit
97c6d25d54
1 changed files with 5 additions and 0 deletions
|
@ -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…
Reference in a new issue