1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 12:15:33 +00:00

Cleanup(CSVRender::Cell:updateLand): Early exit when landscape should

not be loaded
This commit is contained in:
Dave Corley 2023-12-09 11:53:18 -06:00
parent c215ee2f6f
commit 09f41c9464

View file

@ -133,8 +133,10 @@ void CSVRender::Cell::updateLand()
// Setup land if available
const CSMWorld::IdCollection<CSMWorld::Land>& land = mData.getLand();
int landIndex = land.searchId(mId);
if (landIndex != -1 && !land.getRecord(mId).isDeleted())
{
if (landIndex == -1 || land.getRecord(mId).isDeleted())
return;
const ESM::Land& esmLand = land.getRecord(mId).get();
if (!esmLand.getLandData(ESM::Land::DATA_VHGT))
@ -158,7 +160,6 @@ void CSVRender::Cell::updateLand()
mCellBorder = std::make_unique<CellBorder>(mCellNode, mCoordinates);
mCellBorder->buildShape(esmLand);
}
}
void CSVRender::Cell::unloadLand()