diff options
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/llmath/llvolume.cpp | 2 | ||||
| -rwxr-xr-x | indra/newview/llvovolume.cpp | 7 | 
2 files changed, 7 insertions, 2 deletions
| diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index b2fe9ba6c2..1a95f9cd46 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -2734,7 +2734,7 @@ void LLVolume::cacheOptimize()  S32	LLVolume::getNumFaces() const  { -	return (S32)mProfilep->mFaces.size(); +	return mIsMeshAssetLoaded ? getNumVolumeFaces() : (S32)mProfilep->mFaces.size();  } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d3ef1771c3..6b0a5d8642 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1660,11 +1660,16 @@ BOOL LLVOVolume::updateGeometry(LLDrawable *drawable)  			compiled = TRUE;  			sNumLODChanges += new_num_faces ; +			if((S32)getNumTEs() != getVolume()->getNumFaces()) +			{ +				setNumTEs(getVolume()->getNumFaces()); //mesh loading may change number of faces. +			} +  			drawable->setState(LLDrawable::REBUILD_VOLUME); // for face->genVolumeTriangles()  			{  				LLFastTimer t(FTM_GEN_TRIANGLES); -				if (new_num_faces != old_num_faces) +				if (new_num_faces != old_num_faces || mNumFaces != (S32)getNumTEs())  				{  					regenFaces();  				} | 
