summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llviewerregion.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index b3837a41fe..f549f6740d 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1435,18 +1435,22 @@ void LLViewerRegion::killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>&
if(!drawablep->getParent())
{
- //LLViewerObject::const_child_list_t& child_list = drawablep->getVObj()->getChildren();
- //for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
- // iter != child_list.end(); iter++)
- //{
- // LLViewerObject* child = *iter;
- // if(child->mDrawable->isRecentlyVisible())
- // {
- // //set the parent group visible if any of its children visible.
- // ((LLViewerOctreeEntryData*)drawablep)->setVisible();
- // return;
- // }
- //}
+ LLViewerObject::const_child_list_t& child_list = drawablep->getVObj()->getChildren();
+ for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
+ iter != child_list.end(); iter++)
+ {
+ LLViewerObject* child = *iter;
+ if(child->mDrawable)
+ {
+ LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)child->mDrawable->getGroup();
+ if(group && group->isAnyRecentlyVisible())
+ {
+ //set the parent group visible if any of its children visible.
+ ((LLViewerOctreeEntryData*)drawablep)->setVisible();
+ return;
+ }
+ }
+ }
delete_list.push_back(drawablep);
}
}