diff options
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 873622d44e..d8712737ae 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -207,7 +207,7 @@ const U32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0; const F64 HUD_OVERSIZED_TEXTURE_DATA_SIZE = 1024 * 1024; const F32 MAX_TEXTURE_WAIT_TIME_SEC = 60; -const F32 MAX_ATTACHMENT_WAIT_TIME_SEC = 120; +const F32 MAX_ATTACHMENT_WAIT_TIME_SEC = 60; const S32 MIN_NONTUNED_AVS = 5; @@ -680,7 +680,6 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mMutedAVColor(LLColor4::white /* used for "uninitialize" */), mFirstFullyVisible(true), mFirstDecloudTime(-1.f), - mFirstUseDelaySeconds(FIRST_APPEARANCE_CLOUD_MIN_DELAY), mFullyLoaded(false), mPreviousFullyLoaded(false), mFullyLoadedInitialized(false), @@ -2587,6 +2586,27 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) LL_INFOS() << "Warning! Idle on dead avatar" << LL_ENDL; return; } + + LLCachedControl<bool> friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false); + if (friends_only() + && !isUIAvatar() + && !isControlAvatar() + && !isSelf() + && !isBuddy()) + { + if (mNameText) + { + mNameIsSet = false; + mNameText->markDead(); + mNameText = NULL; + sNumVisibleChatBubbles--; + } + deleteParticleSource(); + mVoiceVisualizer->setVoiceEnabled(false); + + return; + } + // record time and refresh "tooSlow" status updateTooSlow(); @@ -8287,7 +8307,7 @@ bool LLVOAvatar::updateIsFullyLoaded() ); // compare amount of attachments to one reported by simulator - if (!loading && !isSelf() && rez_status < 4 && mLastCloudAttachmentCount != mSimAttachments.size()) + if (!loading && !isSelf() && rez_status < 4 && mLastCloudAttachmentCount < mSimAttachments.size()) { S32 attachment_count = getAttachmentCount(); if (mLastCloudAttachmentCount != attachment_count) @@ -8355,11 +8375,12 @@ bool LLVOAvatar::processFullyLoadedChange(bool loading) if (mFirstFullyVisible) { + F32 first_use_delay = FIRST_APPEARANCE_CLOUD_MIN_DELAY; if (!isSelf() && loading) { // Note that textures can causes 60s delay on thier own // so this delay might end up on top of textures' delay - mFirstUseDelaySeconds = llclamp( + first_use_delay = llclamp( mFirstAppearanceMessageTimer.getElapsedTimeF32(), FIRST_APPEARANCE_CLOUD_MIN_DELAY, FIRST_APPEARANCE_CLOUD_MAX_DELAY); @@ -8368,10 +8389,10 @@ bool LLVOAvatar::processFullyLoadedChange(bool loading) { // Impostors are less of a priority, // let them stay cloud longer - mFirstUseDelaySeconds *= FIRST_APPEARANCE_CLOUD_IMPOSTOR_MODIFIER; + first_use_delay *= FIRST_APPEARANCE_CLOUD_IMPOSTOR_MODIFIER; } } - mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > mFirstUseDelaySeconds); + mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > first_use_delay); } else { @@ -9382,7 +9403,17 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe << (attachment_id.isNull() ? "pending" : attachment_id.asString()) << " on point " << (S32)attach_point << LL_ENDL; - mSimAttachments[attachment_id] = attach_point; + if (attachment_id.notNull()) + { + mSimAttachments[attachment_id] = attach_point; + } + else + { + // at the moment viewer is only interested in non-null attachments + LL_DEBUGS("AVAppearanceAttachments") << "AV " << getID() + << " has null attachment on point " << (S32)attach_point + << ", discarding" << LL_ENDL; + } } // todo? Doesn't detect if attachments were switched @@ -11709,4 +11740,8 @@ F32 LLVOAvatar::getAverageGPURenderTime() return ret; } +bool LLVOAvatar::isBuddy() const +{ + return LLAvatarTracker::instance().isBuddy(getID()); +} |