Don't try to get the center of a null bounding box

actorid
Chris Robinson 12 years ago
parent 80d271aeb1
commit b4b095ca72

@ -355,7 +355,8 @@ void Animation::addExtraLight(Ogre::SceneManager *sceneMgr, NifOgre::ObjectList
bounds.merge(ent->getBoundingBox());
}
Ogre::SceneNode *node = mInsert->createChildSceneNode(bounds.getCenter());
Ogre::SceneNode *node = bounds.isFinite() ? mInsert->createChildSceneNode(bounds.getCenter())
: mInsert->createChildSceneNode();
node->attachObject(olight);
}
}

Loading…
Cancel
Save