diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 9f77dfed1b..9486126234 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1341,12 +1341,16 @@ namespace MWWorld for (int i=0; i<4; ++i) { direction = fallbackDirections[i]; - // check if spawn point is safe, fall back to another direction if not osg::Vec3f spawnPoint = pos; if (direction == 0) spawnPoint = pos + (orientation * osg::Vec3f(0,1,0)) * distance; else if(direction == 1) spawnPoint = pos - (orientation * osg::Vec3f(0,1,0)) * distance; else if(direction == 2) spawnPoint = pos - (orientation * osg::Vec3f(1,0,0)) * distance; else if(direction == 3) spawnPoint = pos + (orientation * osg::Vec3f(1,0,0)) * distance; + + if (!ptr.getClass().isActor()) + break; + + // check if spawn point is safe, fall back to another direction if not spawnPoint.z() += 30; // move up a little to account for slopes, will snap down later if (!castRay(spawnPoint.x(), spawnPoint.y(), spawnPoint.z(),