summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2023-10-03 19:28:18 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2023-10-03 19:42:47 +0300
commit13f1273c1d0cd7af382b282bd54da2b7efcc70b3 (patch)
tree31a0e89bd7fe86a91b0fccf3f33642af0741c7bc /indra/newview/llvovolume.cpp
parent78f5dbd95f1295af14093807ca125b92e6f5a9d3 (diff)
parent2465470817957c8378e81ec1a7e32551fbac7b26 (diff)
Merge branch 'main' into DRTVWR-588-maint-W
# Conflicts: # indra/llui/lltooltip.h # indra/newview/llinventoryfunctions.cpp # indra/newview/llvovolume.cpp # indra/newview/skins/default/textures/textures.xml
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index c7054102fd..269c5666cc 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -5110,6 +5110,30 @@ LLControlAVBridge::LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regi
mPartitionType = LLViewerRegion::PARTITION_CONTROL_AV;
}
+void LLControlAVBridge::updateSpatialExtents()
+{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+
+ 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
+ LLControlAvatar* controlAvatar = getVObj() ? getVObj()->getControlAvatar() : NULL;
+ if (controlAvatar
+ && controlAvatar->mDrawable
+ && controlAvatar->mDrawable->getEntry()
+ && (rootWasDirty || controlAvatar->mPlaying))
+ {
+ root->expandExtents(controlAvatar->mDrawable->getSpatialExtents(), *mDrawable->getXform());
+ }
+}
+
bool can_batch_texture(LLFace* facep)
{
if (facep->getTextureEntry()->getBumpmap())