summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-11-21 17:35:41 -0700
committerXiaohong Bao <bao@lindenlab.com>2013-11-21 17:35:41 -0700
commitfbd0d85e547ccef688fb0a5dcfbb8a442de25f45 (patch)
treed3bb589bf73058471d4e16bfdb8633e0fc247c4f
parentf89b5d2f7467710286a57e20400bc588cdaf98bc (diff)
fix for SH-4633: Idle avatars intermittently vanish from the scene after camming away, and returning to a location.
-rwxr-xr-xindra/newview/llviewerregion.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index f1ac4328e4..bcb7943d7f 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1480,10 +1480,18 @@ void LLViewerRegion::killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>&
LLViewerObject* child = *iter;
if(child->mDrawable)
{
+ if(!child->mDrawable->getEntry() || !child->mDrawable->getEntry()->hasVOCacheEntry())
+ {
+ //do not remove parent if any of its children non-cacheable
+ //especially for the case that an avatar sits on a cache-able object
+ ((LLViewerOctreeEntryData*)drawablep)->setVisible();
+ return;
+ }
+
LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)child->mDrawable->getGroup();
if(group && group->isAnyRecentlyVisible())
{
- //set the parent group visible if any of its children visible.
+ //set the parent visible if any of its children visible.
((LLViewerOctreeEntryData*)drawablep)->setVisible();
return;
}