|
|
|
@ -137,29 +137,29 @@ void CSVRender::Cell::updateLand()
|
|
|
|
|
{
|
|
|
|
|
const ESM::Land& esmLand = land.getRecord(mId).get();
|
|
|
|
|
|
|
|
|
|
if (esmLand.getLandData(ESM::Land::DATA_VHGT))
|
|
|
|
|
if (!esmLand.getLandData(ESM::Land::DATA_VHGT))
|
|
|
|
|
mTerrainStorage->resetHeights();
|
|
|
|
|
|
|
|
|
|
if (mTerrain)
|
|
|
|
|
{
|
|
|
|
|
if (mTerrain)
|
|
|
|
|
{
|
|
|
|
|
mTerrain->unloadCell(mCoordinates.getX(), mCoordinates.getY());
|
|
|
|
|
mTerrain->clearAssociatedCaches();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
constexpr double expiryDelay = 0;
|
|
|
|
|
mTerrain = std::make_unique<Terrain::TerrainGrid>(mCellNode, mCellNode, mData.getResourceSystem().get(),
|
|
|
|
|
mTerrainStorage, Mask_Terrain, ESM::Cell::sDefaultWorldspaceId, expiryDelay);
|
|
|
|
|
}
|
|
|
|
|
mTerrain->unloadCell(mCoordinates.getX(), mCoordinates.getY());
|
|
|
|
|
mTerrain->clearAssociatedCaches();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
constexpr double expiryDelay = 0;
|
|
|
|
|
mTerrain = std::make_unique<Terrain::TerrainGrid>(mCellNode, mCellNode, mData.getResourceSystem().get(),
|
|
|
|
|
mTerrainStorage, Mask_Terrain, ESM::Cell::sDefaultWorldspaceId, expiryDelay);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mTerrain->loadCell(esmLand.mX, esmLand.mY);
|
|
|
|
|
mTerrain->loadCell(esmLand.mX, esmLand.mY);
|
|
|
|
|
|
|
|
|
|
if (!mCellBorder)
|
|
|
|
|
mCellBorder = std::make_unique<CellBorder>(mCellNode, mCoordinates);
|
|
|
|
|
if (!mCellBorder)
|
|
|
|
|
mCellBorder = std::make_unique<CellBorder>(mCellNode, mCoordinates);
|
|
|
|
|
|
|
|
|
|
mCellBorder->buildShape(esmLand);
|
|
|
|
|
mCellBorder->buildShape(esmLand);
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// No land data
|
|
|
|
|