From 14532f0aa01524b9062583081f8902c2aaf7abf1 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 4 May 2010 15:29:56 -0400 Subject: DEV-49557 : FIXED : Attachments can show up hanging in space Adding viewer-side sanity check to make sure attachments have a legal slot. --- indra/newview/llvoavatar.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llvoavatar.cpp') 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) -- cgit v1.3 From 1fa673fa168821698f1f278190f19ad179c2667f Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 4 May 2010 17:25:27 -0400 Subject: EXT-7214 : FIXED : Add debug setting to show avatar rez times Changed from #define to debug setting "DebugAvatarRezTime". --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llvoavatar.cpp | 19 +++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d689822e4e..db5da4c9e5 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1652,6 +1652,17 @@ Value + DebugAvatarRezTime + + Comment + Display times for avatars to resolve. + Persist + 1 + Type + Boolean + Value + 0 + DebugBeaconLineWidth Comment diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index c15fd563ae..674e4b6d82 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -102,8 +102,6 @@ #include -#define DISPLAY_AVATAR_LOAD_TIMES - using namespace LLVOAvatarDefines; //----------------------------------------------------------------------------- @@ -5892,16 +5890,17 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > PAUSE); -#ifdef DISPLAY_AVATAR_LOAD_TIMES - if (!mPreviousFullyLoaded && !loading && mFullyLoaded) + if (gSavedSettings.getBOOL("DebugAvatarRezTime")) { - llinfos << "Avatar '" << getFullname() << "' resolved in " << mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl; - LLSD args; - args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); - args["NAME"] = getFullname(); - LLNotificationsUtil::add("AvatarRezNotification",args); + if (!mPreviousFullyLoaded && !loading && mFullyLoaded) + { + llinfos << "Avatar '" << getFullname() << "' resolved in " << mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl; + LLSD args; + args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); + args["NAME"] = getFullname(); + LLNotificationsUtil::add("AvatarRezNotification",args); + } } -#endif // did our loading state "change" from last call? const S32 UPDATE_RATE = 30; -- cgit v1.3