diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-12-05 17:41:29 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-12-05 17:41:29 -0700 |
commit | 24a2ba735540f896bb84dfdbaff8644b1d60044b (patch) | |
tree | 8cbf1daaa1f2a370f75bef1086c9b4883ebeb45e /indra/newview/llviewerregion.cpp | |
parent | 72fdde2c0d4f2c60969e52dc64b6f499dabdbe04 (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-x | indra/newview/llviewerregion.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index c3cdfa2901..f9689c7473 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -847,13 +847,18 @@ void LLViewerRegion::replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCac } //physically delete the cache entry -void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry) +void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry, bool for_rendering) { if(!entry) { return; } + if(for_rendering && !entry->isState(LLVOCacheEntry::ACTIVE)) + { + addNewObject(entry); //force to add to rendering pipeline + } + //remove from active list and waiting list if(entry->isState(LLVOCacheEntry::ACTIVE)) { @@ -882,9 +887,20 @@ void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry) parent->removeChild(entry); } } - else if(entry->getNumOfChildren() > 0)//disconnect children if has any + else if(entry->getNumOfChildren() > 0)//remove children from cache if has any { - entry->removeAllChildren(); + S32 num_child = entry->getNumOfChildren(); + + LLVOCacheEntry* child; + for(S32 i = 0; i < num_child; i++) + { + child = entry->getChild(i); + if(child) + { + child->setParentID(0); //disconnect from parent + killCacheEntry(child, for_rendering); + } + } } //remove from mCacheMap, real deletion @@ -1552,13 +1568,13 @@ LLViewerObject* LLViewerRegion::updateCacheEntry(U32 local_id, LLViewerObject* o if(!objectp) //object not created { //create a new object from cache. - objectp = gObjectList.processObjectUpdateFromCache(entry, this); + objectp = addNewObject(entry); } //remove from cache if terse update if(update_type == (U32)OUT_TERSE_IMPROVED) { - killCacheEntry(entry); + killCacheEntry(entry, true); } return objectp; |