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

c++11
scrawl 10 years ago
parent b978153edb
commit 2883ecc19a

@ -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)

Loading…
Cancel
Save