summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-12-04 12:36:28 -0700
committerXiaohong Bao <bao@lindenlab.com>2013-12-04 12:36:28 -0700
commit4a3e01f8dc1e8cf38183c9be564c7f4fa5dd49d3 (patch)
tree4f388c785352c825f9a8ab2402fea063a2d0f2c8 /indra/newview/llviewerregion.cpp
parentd8e92867162f8c4ff9489d8eefde53546e907dff (diff)
fix for SH-4631: Parts of linked objects are not shown in new release Second Life 3.6.11
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 939c6dbed1..57938f8490 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1535,9 +1535,15 @@ LLViewerObject* LLViewerRegion::addNewObject(LLVOCacheEntry* entry)
return obj;
}
-//remove from object cache if the object receives a full-update or terse update
-LLViewerObject* LLViewerRegion::forceToRemoveFromCache(U32 local_id, LLViewerObject* objectp)
+//update object cache if the object receives a full-update or terse update
+//update_type == EObjectUpdateType::OUT_TERSE_IMPROVED or EObjectUpdateType::OUT_FULL
+LLViewerObject* LLViewerRegion::updateCacheEntry(U32 local_id, LLViewerObject* objectp, U32 update_type)
{
+ if(objectp && update_type != (U32)OUT_TERSE_IMPROVED)
+ {
+ return objectp; //no need to access cache
+ }
+
LLVOCacheEntry* entry = getCacheEntry(local_id);
if (!entry)
{
@@ -1545,14 +1551,15 @@ LLViewerObject* LLViewerRegion::forceToRemoveFromCache(U32 local_id, LLViewerObj
}
if(!objectp) //object not created
{
- entry->setTouched(FALSE); //mark this entry invalid
-
- //create a new object before delete it from cache.
+ //create a new object from cache.
objectp = gObjectList.processObjectUpdateFromCache(entry, this);
}
- //remove from cache.
- killCacheEntry(entry);
+ //remove from cache if terse update
+ if(update_type == (U32)OUT_TERSE_IMPROVED)
+ {
+ killCacheEntry(entry);
+ }
return objectp;
}