diff options
author | Dave SIMmONs <simon@lindenlab.com> | 2011-02-24 17:42:16 -0800 |
---|---|---|
committer | Dave SIMmONs <simon@lindenlab.com> | 2011-02-24 17:42:16 -0800 |
commit | 52ae219d502d182a7e6c000070e5935b923f30e7 (patch) | |
tree | 556151d5097feb5ae079786044188cb0d0400d16 /indra/newview/llvovolume.cpp | |
parent | 1c8c28a8de73228c06fdf2d84045433c7231cd19 (diff) | |
parent | 609c70eb5a48389bef1ad33358774764ee9615e2 (diff) |
Merge again lindenlab/viewer-development
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 761e12020b..a207d3e050 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -388,10 +388,12 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, // There's something bogus in the data that we're unpacking. dp->dumpBufferToLog(); llwarns << "Flushing cache files" << llendl; - std::string mask; - mask = gDirUtilp->getDirDelimiter() + "*.slc"; - gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,""), mask); -// llerrs << "Bogus TE data in " << getID() << ", crashing!" << llendl; + + if(LLVOCache::hasInstance() && getRegion()) + { + LLVOCache::getInstance()->removeEntry(getRegion()->getHandle()) ; + } + llwarns << "Bogus TE data in " << getID() << llendl; } else @@ -667,11 +669,32 @@ void LLVOVolume::updateTextures() } } +BOOL LLVOVolume::isVisible() const +{ + if(mDrawable.notNull() && mDrawable->isVisible()) + { + return TRUE ; + } + + if(isAttachment()) + { + LLViewerObject* objp = (LLViewerObject*)getParent() ; + while(objp && !objp->isAvatar()) + { + objp = (LLViewerObject*)objp->getParent() ; + } + + return objp && objp->mDrawable.notNull() && objp->mDrawable->isVisible() ; + } + + return FALSE ; +} + void LLVOVolume::updateTextureVirtualSize() { // Update the pixel area of all faces - if(mDrawable.isNull() || !mDrawable->isVisible()) + if(!isVisible()) { return ; } @@ -2142,7 +2165,7 @@ void LLVOVolume::removeMediaImpl(S32 texture_index) } //make the face referencing to mMediaImplList[texture_index] to point back to the old texture. - if(mDrawable) + if(mDrawable && texture_index < mDrawable->getNumFaces()) { LLFace* facep = mDrawable->getFace(texture_index) ; if(facep) @@ -2738,14 +2761,7 @@ void LLVOVolume::updateRadius() BOOL LLVOVolume::isAttachment() const { - if (mState == 0) - { - return FALSE; - } - else - { - return TRUE; - } + return mState != 0 ; } BOOL LLVOVolume::isHUDAttachment() const |