From 11a78da4b12b99e820c2018f1a0b70ea2a222a07 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Fri, 23 Aug 2013 12:23:21 -0600
Subject: more fix for SH-4400: Interesting: Side effect 1 of unloading culled
 objects.

---
 indra/newview/llvocache.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 2430fa556a..ebde17dcef 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -374,14 +374,13 @@ bool LLVOCacheEntry::isRecentlyVisible() const
 		vis = (sCurVisible - getVisible() < mMinFrameRange);
 	}
 
-	if(!vis && !mParentID && mSceneContrib > 0.f)
+	//combination of projected area and squared distance
+	if(!vis && !mParentID && mSceneContrib > 0.0311f) //projection angle > 10 (degree)
 	{
-		//projection area: mSceneContrib
-
 		//squared distance
-		const F32 SQUARED_CUT_OFF_DIST = 225.0; //15m
+		const F32 SQUARED_CUT_OFF_DIST = 256.0; //16m
 		F32 rad = getBinRadius();
-		vis = (rad * rad / mSceneContrib > SQUARED_CUT_OFF_DIST);
+		vis = (rad * rad / mSceneContrib < SQUARED_CUT_OFF_DIST);
 	}
 
 	return vis;
-- 
cgit v1.2.3