mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-21 16:41:29 +00:00
Don't try to get the center of a null bounding box
This commit is contained in:
parent
80d271aeb1
commit
b4b095ca72
1 changed files with 2 additions and 1 deletions
|
@ -355,7 +355,8 @@ void Animation::addExtraLight(Ogre::SceneManager *sceneMgr, NifOgre::ObjectList
|
||||||
bounds.merge(ent->getBoundingBox());
|
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);
|
node->attachObject(olight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue