|
|
|
@ -79,6 +79,11 @@ void Objects::insertModel(const MWWorld::Ptr &ptr, const std::string &mesh)
|
|
|
|
|
|
|
|
|
|
std::auto_ptr<ObjectAnimation> anim(new ObjectAnimation(ptr, mesh));
|
|
|
|
|
|
|
|
|
|
if(ptr.getTypeName() == typeid(ESM::Light).name())
|
|
|
|
|
anim->addLight(ptr.get<ESM::Light>()->mBase);
|
|
|
|
|
|
|
|
|
|
if (!mesh.empty())
|
|
|
|
|
{
|
|
|
|
|
Ogre::AxisAlignedBox bounds = anim->getWorldBounds();
|
|
|
|
|
Ogre::Vector3 extents = bounds.getSize();
|
|
|
|
|
extents *= ptr.getRefData().getBaseNode()->getScale();
|
|
|
|
@ -94,9 +99,6 @@ void Objects::insertModel(const MWWorld::Ptr &ptr, const std::string &mesh)
|
|
|
|
|
mBounds[ptr.getCell()] = Ogre::AxisAlignedBox::BOX_NULL;
|
|
|
|
|
mBounds[ptr.getCell()].merge(bounds);
|
|
|
|
|
|
|
|
|
|
if(ptr.getTypeName() == typeid(ESM::Light).name())
|
|
|
|
|
anim->addLight(ptr.get<ESM::Light>()->mBase);
|
|
|
|
|
|
|
|
|
|
if(ptr.getTypeName() == typeid(ESM::Static).name() &&
|
|
|
|
|
Settings::Manager::getBool("use static geometry", "Objects") &&
|
|
|
|
|
anim->canBatch())
|
|
|
|
@ -153,6 +155,7 @@ void Objects::insertModel(const MWWorld::Ptr &ptr, const std::string &mesh)
|
|
|
|
|
* it. Would require associating the Ptr with the StaticGeometry. */
|
|
|
|
|
anim.reset();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(anim.get() != NULL)
|
|
|
|
|
mObjects.insert(std::make_pair(ptr, anim.release()));
|
|
|
|
|