diff options
| author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2023-05-31 12:45:22 +0200 |
|---|---|---|
| committer | Guru <alexandrgproductengine@lindenlab.com> | 2023-06-02 23:10:46 +0200 |
| commit | bbd0a09fbaaa354f522bf77241b9039288f10479 (patch) | |
| tree | 52be14b510cb10b2245dd050702f9b3c4e987b94 /indra/newview/llvovolume.cpp | |
| parent | 0a342cfe7cc92cdfe308bc75753750c99b0327e6 (diff) | |
SL-18251 Expand extents to include the Control Avatar bounds
Diffstat (limited to 'indra/newview/llvovolume.cpp')
| -rw-r--r-- | indra/newview/llvovolume.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index e9a1724639..3842dfff7c 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5110,6 +5110,28 @@ LLControlAVBridge::LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regi mPartitionType = LLViewerRegion::PARTITION_CONTROL_AV; } +void LLControlAVBridge::updateSpatialExtents() +{ + LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE + + LLControlAvatar* controlAvatar = getVObj()->getControlAvatar(); + + LLSpatialGroup* root = (LLSpatialGroup*)mOctree->getListener(0); + + bool rootWasDirty = root->isDirty(); + + super::updateSpatialExtents(); // root becomes non-dirty here + + // SL-18251 "On-screen animesh characters using pelvis offset animations + // disappear when root goes off-screen" + // + // Expand extents to include Control Avatar placed outside of the bounds + if (controlAvatar && (rootWasDirty || controlAvatar->mPlaying)) + { + root->expandExtents(controlAvatar->mDrawable->getSpatialExtents(), *mDrawable->getXform()); + } +} + bool can_batch_texture(LLFace* facep) { if (facep->getTextureEntry()->getBumpmap()) |
