summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-05-20 14:59:05 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-05-20 14:59:05 +0300
commit8101b70999879a350a7c71b30ab820d1f2c5d0ef (patch)
tree2ed455df46bca3361c9f42aa169a1003448989a7
parentf5e63b06277d25f2f7bf3e10982a7ce463115249 (diff)
SL-10562 Children in Animesh linksets can not be selected in some cases
-rw-r--r--indra/newview/llcontrolavatar.cpp46
1 files changed, 35 insertions, 11 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index 0f02c23cb0..a9282169a2 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -566,27 +566,51 @@ LLViewerObject* LLControlAvatar::lineSegmentIntersectRiggedAttachments(const LLV
LLVector4a* normal,
LLVector4a* tangent)
{
- LLViewerObject* hit = NULL;
+ if (!mRootVolp)
+ {
+ return NULL;
+ }
- if (lineSegmentBoundingBox(start, end))
- {
- LLVector4a local_end = end;
- LLVector4a local_intersection;
+ LLViewerObject* hit = NULL;
- if (mRootVolp &&
- mRootVolp->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent))
+ if (lineSegmentBoundingBox(start, end))
+ {
+ LLVector4a local_end = end;
+ LLVector4a local_intersection;
+ if (mRootVolp->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent))
{
local_end = local_intersection;
if (intersection)
{
*intersection = local_intersection;
}
-
hit = mRootVolp;
}
- }
-
- return hit;
+ else
+ {
+ std::vector<LLVOVolume*> volumes;
+ getAnimatedVolumes(volumes);
+
+ // Rebuild mSignaledAnimations from the associated volumes.
+ std::map<LLUUID, S32> anims;
+ for (std::vector<LLVOVolume*>::iterator vol_it = volumes.begin(); vol_it != volumes.end(); ++vol_it)
+ {
+ LLVOVolume *volp = *vol_it;
+ if (mRootVolp != volp && volp->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent))
+ {
+ local_end = local_intersection;
+ if (intersection)
+ {
+ *intersection = local_intersection;
+ }
+ hit = volp;
+ break;
+ }
+ }
+ }
+ }
+
+ return hit;
}
// virtual