diff options
| author | Brad Linden <brad@lindenlab.com> | 2023-08-23 12:26:14 -0700 |
|---|---|---|
| committer | Brad Linden <brad@lindenlab.com> | 2023-08-23 12:26:14 -0700 |
| commit | c6d5f11f63dfa0ac65a2afebf88b3078f571e044 (patch) | |
| tree | 63fd8081ce450fd426ea717adc04d09b0da4b713 /indra/newview/llvovolume.cpp | |
| parent | ef33902f220df35727ba54ee8bc3ed02bc53d6be (diff) | |
| parent | d454512050e636a19e4b7545515dea4f4b1bbf0d (diff) | |
Merge remote-tracking branch 'origin/main' into DRTVWR-559
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 b521dcba5a..34f55d3341 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5102,6 +5102,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()) |
