From 58b153cf878370643bd61914538a80e6512c7e5c Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 13 Nov 2013 09:51:01 -0700 Subject: fix for SH-4608: Interesting: minimap shows objects loading/uinloading behind your camera when camera is rotated --- indra/newview/llviewerregion.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerregion.cpp') diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 06f9af8751..07a470e3bc 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -962,6 +962,7 @@ void LLViewerRegion::removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* d else //insert to vo cache tree. { entry->updateParentBoundingInfo(); + entry->saveBoundingSphere(); addToVOCacheTree(entry); } @@ -1391,7 +1392,9 @@ void LLViewerRegion::killInvisibleObjects(F32 max_time) LLTimer update_timer; LLVector4a camera_origin; - camera_origin.load3(LLViewerCamera::getInstance()->getOrigin().mV); + camera_origin.load3(LLViewerCamera::getInstance()->getOrigin().mV); + LLVector4a local_origin; + local_origin.load3((LLViewerCamera::getInstance()->getOrigin() - getOriginAgent()).mV); F32 back_threshold = LLVOCacheEntry::sRearFarRadius; bool unstable = sNewObjectCreationThrottle < 0; @@ -1417,7 +1420,7 @@ void LLViewerRegion::killInvisibleObjects(F32 max_time) continue; //skip child objects, they are removed with their parent. } - if(!(*iter)->isAnyVisible(camera_origin, back_threshold) && (unstable || (*iter)->mLastCameraUpdated < sLastCameraUpdated)) + if(!(*iter)->isAnyVisible(camera_origin, local_origin, back_threshold) && (unstable || (*iter)->mLastCameraUpdated < sLastCameraUpdated)) { killObject((*iter), delete_list); } -- cgit v1.2.3