summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-05-04 15:29:56 -0400
committerLoren Shih <seraph@lindenlab.com>2010-05-04 15:29:56 -0400
commit14532f0aa01524b9062583081f8902c2aaf7abf1 (patch)
tree7b41ef406176088fb24b89987633ab929698abf1
parenta322dd0c2138bde56465633b943438ac378e6aab (diff)
DEV-49557 : FIXED : Attachments can show up hanging in space
Adding viewer-side sanity check to make sure attachments have a legal slot.
-rw-r--r--indra/newview/llvoavatar.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 3f021d1f84..c15fd563ae 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -5473,6 +5473,14 @@ LLViewerJointAttachment* LLVOAvatar::getTargetAttachmentPoint(LLViewerObject* vi
{
S32 attachmentID = ATTACHMENT_ID_FROM_STATE(viewer_object->getState());
+ // This should never happen unless the server didn't process the attachment point
+ // correctly, but putting this check in here to be safe.
+ if (attachmentID & ATTACHMENT_ADD)
+ {
+ llwarns << "Got an attachment with ATTACHMENT_ADD mask, removing ( attach pt:" << attachmentID << " )" << llendl;
+ attachmentID &= ~ATTACHMENT_ADD;
+ }
+
LLViewerJointAttachment* attachment = get_if_there(mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL);
if (!attachment)