diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-08-19 16:09:28 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-08-19 16:09:28 -0600 |
commit | d8c02bf06250015b8cb0bcc9c0d8445cfb6acf1c (patch) | |
tree | 2e7966158d684828422c2b9f0d4129fa1ef1b395 /indra/newview/llvovolume.cpp | |
parent | 4290365ebbf5505bee4fbed8043996fa7687fd03 (diff) | |
parent | 171089207b528ab80a954292c127ba77254ee927 (diff) |
Merge
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rwxr-xr-x | indra/newview/llvovolume.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 547ea3369d..4ff9bc6981 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1112,7 +1112,13 @@ void LLVOVolume::sculpt() S32 max_discard = mSculptTexture->getMaxDiscardLevel(); if (discard_level > max_discard) - discard_level = max_discard; // clamp to the best we can do + { + discard_level = max_discard; // clamp to the best we can do + } + if(discard_level > MAX_DISCARD_LEVEL) + { + return; //we think data is not ready yet. + } S32 current_discard = getVolume()->getSculptLevel() ; if(current_discard < -2) @@ -1451,7 +1457,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global) continue; } res &= face->genVolumeBBoxes(*volume, i, - mRelativeXform, mRelativeXformInvTrans, + mRelativeXform, (mVolumeImpl && mVolumeImpl->isVolumeGlobal()) || force_global); if (rebuild) @@ -4833,7 +4839,14 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if (is_rigged) { - drawablep->setState(LLDrawable::RIGGED); + if (!drawablep->isState(LLDrawable::RIGGED)) + { + drawablep->setState(LLDrawable::RIGGED); + + //first time this is drawable is being marked as rigged, + // do another LoD update to use avatar bounding box + vobj->updateLOD(); + } } else { |