mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 12:09:53 +00:00
Fix(CS): Initialize landscape when opening an existing cell without VHGT
This commit is contained in:
parent
2541b74fc6
commit
3e7335ddc7
1 changed files with 21 additions and 21 deletions
|
@ -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->loadCell(esmLand.mX, esmLand.mY);
|
||||
|
||||
if (!mCellBorder)
|
||||
mCellBorder = std::make_unique<CellBorder>(mCellNode, mCoordinates);
|
||||
|
||||
mCellBorder->buildShape(esmLand);
|
||||
|
||||
return;
|
||||
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);
|
||||
|
||||
if (!mCellBorder)
|
||||
mCellBorder = std::make_unique<CellBorder>(mCellNode, mCoordinates);
|
||||
|
||||
mCellBorder->buildShape(esmLand);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// No land data
|
||||
|
|
Loading…
Reference in a new issue