From 2883ecc19af0721183001810e6c58fc406e7f208 Mon Sep 17 00:00:00 2001
From: scrawl <scrawl@baseoftrash.de>
Date: Wed, 3 Jun 2015 02:41:04 +0200
Subject: [PATCH] Fix the hilarious bug of NPCs falling to their deaths in
 interiors

---
 apps/openmw/mwworld/worldimp.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp
index e676977de3..93a34f2337 100644
--- a/apps/openmw/mwworld/worldimp.cpp
+++ b/apps/openmw/mwworld/worldimp.cpp
@@ -1299,7 +1299,7 @@ namespace MWWorld
         }
 
         float terrainHeight = -std::numeric_limits<float>::max();
-        if (isCellExterior())
+        if (ptr.getCell()->isExterior())
             terrainHeight = mRendering->getTerrainHeightAt(pos.asVec3());
 
         if (pos.pos[2] < terrainHeight)