Merge branch 'navcrash' into 'master'

Fix #5798

Closes #5798

See merge request OpenMW/openmw!554
pull/3044/head
psi29a 4 years ago
commit b28adafee4

@ -340,17 +340,9 @@ namespace MWWorld
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))
navigator->removeObject(DetourNavigator::ObjectId(heightField));
mPhysics->removeHeightField(cellX, cellY);
}
if (const auto heightField = mPhysics->getHeightField(cellX, cellY))
navigator->removeObject(DetourNavigator::ObjectId(heightField));
mPhysics->removeHeightField(cellX, cellY);
}
if ((*iter)->getCell()->hasWater())

Loading…
Cancel
Save