1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00

Fix get vertex Height for esm4

This commit is contained in:
florent.teppe 2023-05-29 11:31:04 +02:00
parent ff9e04062d
commit 9f9a6c06e0

View File

@ -125,9 +125,10 @@ namespace ESMTerrain
float getVertexHeight(const ESM::LandData* data, int x, int y)
{
assert(x < ESM::Land::LAND_SIZE);
assert(y < ESM::Land::LAND_SIZE);
return data->getHeights()[y * ESM::Land::LAND_SIZE + x];
const int landSize = data->getLandSize();
assert(x < landSize);
assert(y < landSize);
return data->getHeights()[y * landSize + x];
}
private: