fix for SH-4631: Parts of linked objects are not shown in new release Second Life 3.6.11

master
Xiaohong Bao 2013-12-05 17:41:29 -07:00
parent 72fdde2c0d
commit 24a2ba7355
2 changed files with 22 additions and 6 deletions

View File

@ -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;

View File

@ -385,7 +385,7 @@ private:
void killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>& delete_list);
void removeFromVOCacheTree(LLVOCacheEntry* entry);
void replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry);
void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry
void killCacheEntry(LLVOCacheEntry* entry, bool for_rendering = false); //physically delete the cache entry
void killInvisibleObjects(F32 max_time);
void createVisibleObjects(F32 max_time);
void updateVisibleEntries(F32 max_time); //update visible entries