1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:23:52 +00:00

Always initialize landShapeNew

This commit is contained in:
Nelsson Huotari 2019-10-23 00:01:23 +03:00
parent 6f9f59dd58
commit ac5b356e8d

View file

@ -310,15 +310,12 @@ void CSVRender::TerrainShapeMode::applyTerrainEditChanges()
{
for(int j = 0; j < ESM::Land::LAND_SIZE; ++j)
{
if (paged)
{
if (paged->getCellAlteredHeight(cellCoordinates, i, j))
if (paged && paged->getCellAlteredHeight(cellCoordinates, i, j))
landShapeNew[j * ESM::Land::LAND_SIZE + i] = landShapePointer[j * ESM::Land::LAND_SIZE + i] + *paged->getCellAlteredHeight(cellCoordinates, i, j);
else
landShapeNew[j * ESM::Land::LAND_SIZE + i] = 0;
}
}
}
// Generate WNAM record
int sqrtLandGlobalMapLodSize = sqrt(ESM::Land::LAND_GLOBAL_MAP_LOD_SIZE);