From 440e576f86bf346bc4120307fcadbfc3a2aa83a9 Mon Sep 17 00:00:00 2001
From: simon <none@none>
Date: Thu, 1 Aug 2013 11:38:17 -0700
Subject: [PATCH] MAINT-2949 : Objects across the sim border do not render when
 approached.  Added missing code block from previous change as per Dave P's
 advice

---
 indra/newview/llface.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index e63e4285e75..9b2b778677a 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -842,6 +842,14 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
 			newMax.setMax(newMax, tv[i]);
 		}
 
+		if (!mDrawablep->isActive())
+		{	// Shift position for region
+			LLVector4a offset;
+			offset.load3(mDrawablep->getRegion()->getOriginAgent().mV);
+			newMin.add(offset);
+			newMax.add(offset);
+		}
+
 		LLVector4a t;
 		t.setAdd(newMin,newMax);
 		t.mul(0.5f);
@@ -851,7 +859,6 @@ BOOL LLFace::genVolumeBBoxes(const LLVolume &volume, S32 f,
 		t.setSub(newMax,newMin);
 		mBoundingSphereRadius = t.getLength3().getF32()*0.5f;
 
-	
 		updateCenterAgent();
 	}
 
-- 
GitLab