Fix the hilarious bug of NPCs falling to their deaths in interiors

This commit is contained in:
scrawl 2015-06-03 02:41:04 +02:00
parent b978153edb
commit 2883ecc19a

View file

@ -1299,7 +1299,7 @@ namespace MWWorld
} }
float terrainHeight = -std::numeric_limits<float>::max(); float terrainHeight = -std::numeric_limits<float>::max();
if (isCellExterior()) if (ptr.getCell()->isExterior())
terrainHeight = mRendering->getTerrainHeightAt(pos.asVec3()); terrainHeight = mRendering->getTerrainHeightAt(pos.asVec3());
if (pos.pos[2] < terrainHeight) if (pos.pos[2] < terrainHeight)