1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 07:23:54 +00:00

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

This commit is contained in:
Chris Robinson 2013-08-07 01:32:36 -07:00
parent 80d271aeb1
commit b4b095ca72

View file

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