mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-22 13:09:41 +00:00
Merge branch 'navcrash' into 'master'
Fix #5798 Closes #5798 See merge request OpenMW/openmw!554
This commit is contained in:
commit
b28adafee4
1 changed files with 3 additions and 11 deletions
|
@ -339,19 +339,11 @@ namespace MWWorld
|
||||||
const auto cellY = (*iter)->getCell()->getGridY();
|
const auto cellY = (*iter)->getCell()->getGridY();
|
||||||
|
|
||||||
if ((*iter)->getCell()->isExterior())
|
if ((*iter)->getCell()->isExterior())
|
||||||
{
|
|
||||||
const ESM::Land* land =
|
|
||||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Land>().search(
|
|
||||||
(*iter)->getCell()->getGridX(),
|
|
||||||
(*iter)->getCell()->getGridY()
|
|
||||||
);
|
|
||||||
if (land && land->mDataTypes&ESM::Land::DATA_VHGT)
|
|
||||||
{
|
{
|
||||||
if (const auto heightField = mPhysics->getHeightField(cellX, cellY))
|
if (const auto heightField = mPhysics->getHeightField(cellX, cellY))
|
||||||
navigator->removeObject(DetourNavigator::ObjectId(heightField));
|
navigator->removeObject(DetourNavigator::ObjectId(heightField));
|
||||||
mPhysics->removeHeightField(cellX, cellY);
|
mPhysics->removeHeightField(cellX, cellY);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ((*iter)->getCell()->hasWater())
|
if ((*iter)->getCell()->hasWater())
|
||||||
navigator->removeWater(osg::Vec2i(cellX, cellY));
|
navigator->removeWater(osg::Vec2i(cellX, cellY));
|
||||||
|
|
Loading…
Reference in a new issue