diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2013-06-24 23:36:05 -0600 | 
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2013-06-24 23:36:05 -0600 | 
| commit | eb8d0bed7b8b068231efc6c0c30b719b4c171c7f (patch) | |
| tree | c3e3516ff27f5fb7ddac94eb9668e544d3a67c62 /indra | |
| parent | 6bb64e79985f0b724dd5b07703666e307a54a98b (diff) | |
fix for SH-4264: interesting: Content near edges of screen does not load
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/newview/llviewerobject.cpp | 5 | ||||
| -rwxr-xr-x | indra/newview/llviewerregion.cpp | 40 | 
2 files changed, 24 insertions, 21 deletions
| diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 5ae08a8b9e..4e514ddfd1 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1026,11 +1026,6 @@ U32 LLViewerObject::extractSpatialExtents(LLDataPackerBinaryBuffer *dp, LLVector  {  	U32	parent_id = 0;  	LLViewerObject::unpackParentID(dp, parent_id); -	if(parent_id > 0) -	{ -		//is a child, no need to decode further. -		return parent_id; -	}  	LLViewerObject::unpackVector3(dp, scale, "Scale");  	LLViewerObject::unpackVector3(dp, pos, "Pos"); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index dd4c7f2aff..d27b37d029 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -910,19 +910,19 @@ void LLViewerRegion::removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* d  		return;  	} +	bool is_orphan = false; +	LLVOCacheEntry* parent = NULL;  	if(entry->getParentID() > 0) //is a child  	{ -		LLVOCacheEntry* parent = getCacheEntry(entry->getParentID()); -		if(parent) -		{ -			parent->addChild(entry); -		} -		else //parent is not in the cache, put into the orphan list. +		parent = getCacheEntry(entry->getParentID()); +		if(!parent)  		{ +			is_orphan = true;  			mOrphanMap[entry->getParentID()].push_back(entry->getLocalID());  		}  	} -	else //insert to vo cache tree. +	 +	if(!is_orphan)//insert to vo cache tree.  	{  		//shift to the local regional space from agent space  		const LLVector3 pos = drawablep->getVObj()->getPositionRegion(); @@ -931,6 +931,11 @@ void LLViewerRegion::removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* d  		shift.setSub(vec, entry->getPositionGroup());  		entry->shift(shift); +		if(parent) //is a child +		{ +			entry->shift(parent->getPositionGroup()); +			parent->addChild(entry); +		}  		addToVOCacheTree(entry);  	} @@ -965,10 +970,6 @@ void LLViewerRegion::addToVOCacheTree(LLVOCacheEntry* entry)  	{  		return;  	} -	if(entry->getParentID() > 0) -	{ -		return; //no child prim in cache octree. -	}  	llassert(!entry->getEntry()->hasDrawable()); @@ -1102,7 +1103,8 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time)  				if(vo_entry->getParentID() > 0) //is a child  				{ -					//child visibility depends on its parent. +					//child visibility depends on its parent, force its parent to be visible +					addVisibleCacheEntry(getCacheEntry(vo_entry->getParentID()));  					continue;  				} @@ -1832,21 +1834,22 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)  		//1, find the parent in cache  		LLVOCacheEntry* parent = getCacheEntry(parent_id); -		//2, parent is not in the cache, put into the orphan list. -		if(!parent) +		//2, parent is not in the cache or not probed, put into the orphan list. +		if(!parent || !parent->getEntry())  		{  			//check if parent is non-cacheable and already created -			if(isNonCacheableObjectCreated(parent_id)) +			if(!parent && isNonCacheableObjectCreated(parent_id))  			{  				//parent is visible, so is the child.  				addVisibleCacheEntry(entry);  			}  			else  			{ +				entry->setBoundingInfo(pos, scale);  			    mOrphanMap[parent_id].push_back(entry->getLocalID());  		    }  		} -		else //parent in cache +		else //parent in cache octree or probed  		{  			if(!parent->isState(LLVOCacheEntry::INACTIVE))   			{ @@ -1855,6 +1858,9 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)  			}  			else  			{ +				entry->setBoundingInfo(pos, scale); +				entry->shift(parent->getPositionGroup()); +				addToVOCacheTree(entry);  				parent->addChild(entry);  			}  		} @@ -1884,6 +1890,8 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)  				LLVOCacheEntry* child = getCacheEntry((*orphans)[i]);  				if(child)  				{ +					child->shift(entry->getPositionGroup()); +					addToVOCacheTree(child);  					entry->addChild(child);  				}  			} | 
