Closes #805: Don't add entities that are supposed to be invisible to static geometry

actorid
scrawl 11 years ago
parent 86b2211932
commit be1938ee90

@ -1211,7 +1211,8 @@ void ObjectAnimation::fillBatch(Ogre::StaticGeometry *sg)
for(;iter != mObjectRoot->mEntities.rend();++iter)
{
Ogre::Node *node = (*iter)->getParentNode();
sg->addEntity(*iter, node->_getDerivedPosition(), node->_getDerivedOrientation(), node->_getDerivedScale());
if ((*iter)->isVisible())
sg->addEntity(*iter, node->_getDerivedPosition(), node->_getDerivedOrientation(), node->_getDerivedScale());
}
}

Loading…
Cancel
Save