From f89b5d2f7467710286a57e20400bc588cdaf98bc Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Thu, 21 Nov 2013 17:34:27 -0700
Subject: combine the visiblities of octree group and object cache entry for
 visiblity check

---
 indra/newview/llvocache.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 65da1e854d..05d61fab49 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -408,7 +408,8 @@ bool LLVOCacheEntry::isAnyVisible(const LLVector4a& camera_origin, const LLVecto
 	//not ready to remove
 	if(!vis)
 	{
-		vis = (group->getAnyVisible() + sMinFrameRange > LLViewerOctreeEntryData::getCurrentFrame());
+		S32 cur_vis = llmax(group->getAnyVisible(), (S32)getVisible());
+		vis = (cur_vis + sMinFrameRange > LLViewerOctreeEntryData::getCurrentFrame());
 	}
 
 	//within the back sphere
-- 
cgit v1.2.3