mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-03 07:17:59 +03:00
Another crash fix for land record without data
This commit is contained in:
parent
8eb1f4e70e
commit
f6509fe53e
2 changed files with 2 additions and 2 deletions
|
@ -383,7 +383,7 @@ namespace ESMTerrain
|
|||
int cellY = std::floor(worldPos.y / 8192.f);
|
||||
|
||||
ESM::Land* land = getLand(cellX, cellY);
|
||||
if (!land)
|
||||
if (!land || !(land->mDataTypes&ESM::Land::DATA_VHGT))
|
||||
return -2048;
|
||||
|
||||
// Mostly lifted from Ogre::Terrain::getHeightAtTerrainPosition
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue