diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llavatarrendernotifier.cpp | 71 | ||||
-rw-r--r-- | indra/newview/llavatarrendernotifier.h | 8 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 11 |
3 files changed, 48 insertions, 42 deletions
diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp index 04689d2726..ca3c1a7310 100644 --- a/indra/newview/llavatarrendernotifier.cpp +++ b/indra/newview/llavatarrendernotifier.cpp @@ -61,7 +61,10 @@ mLatestOverLimitAgents(0), mLatestAgentComplexity(0), mLatestOverLimitPct(0.0f), mShowOverLimitAgents(false), -mNotifyOutfitLoading(false) +mNotifyOutfitLoading(false), +mInitialCofVersion(-1), +mInitialOtfitRezStatus(-1), +mLastSkeletonSerialNum(-1) { mPopUpDelayTimer.resetWithExpiry(OVER_LIMIT_UPDATE_DELAY); } @@ -178,12 +181,41 @@ void LLAvatarRenderNotifier::updateNotificationRegion(U32 agentcount, U32 overLi } } +void LLAvatarRenderNotifier::updateNotificationState() +{ + if (!isAgentAvatarValid()) + { + // data not ready, nothing to show. + return; + } + + if (mInitialCofVersion < 0 + && gAgentWearables.areWearablesLoaded() + && !LLAttachmentsMgr::getInstance()->hasPendingAttachments() + && !LLAttachmentsMgr::getInstance()->hasAttachmentRequests() + && !LLAttachmentsMgr::getInstance()->hasRecentlyArrivedAttachments()) + { + // cof formed + mInitialCofVersion = LLAppearanceMgr::instance().getCOFVersion(); + mLastSkeletonSerialNum = gAgentAvatarp->mLastSkeletonSerialNum; + } + + if (gAgentAvatarp->mLastRezzedStatus >= mInitialOtfitRezStatus) + { + mInitialOtfitRezStatus = gAgentAvatarp->mLastRezzedStatus; + } + else + { + // rez status decreased - outfit related action was initiated + mNotifyOutfitLoading = true; + } +} void LLAvatarRenderNotifier::updateNotificationAgent(U32 agentComplexity) { // save the value for use in following messages mLatestAgentComplexity = agentComplexity; - if (!gAgentWearables.areWearablesLoaded()) + if (!isAgentAvatarValid() || !gAgentWearables.areWearablesLoaded()) { // data not ready, nothing to show. return; @@ -192,29 +224,11 @@ void LLAvatarRenderNotifier::updateNotificationAgent(U32 agentComplexity) if (!mNotifyOutfitLoading) { // We should not notify about initial outfit and it's load process without reason + updateNotificationState(); - if (!isAgentAvatarValid()) - { - return; - } - - static S32 initial_cof_version(-1); - static S32 rez_status(0); - - if (initial_cof_version < 0 - && gAgentWearables.areWearablesLoaded() - && !LLAttachmentsMgr::getInstance()->hasPendingAttachments() - && !LLAttachmentsMgr::getInstance()->hasAttachmentRequests() - && !LLAttachmentsMgr::getInstance()->hasRecentlyArrivedAttachments()) - { - // cof formed - initial_cof_version = LLAppearanceMgr::instance().getCOFVersion(); - - // outfit might have been pre-loaded in one go, we are adding/removing items in such case - mNotifyOutfitLoading = gAgentAvatarp->isAllLocalTextureDataFinal(); - } - - if (initial_cof_version >= 0 && initial_cof_version != gAgentAvatarp->mLastUpdateRequestCOFVersion) + if (mInitialCofVersion >= 0 + && (mInitialCofVersion != gAgentAvatarp->mLastUpdateRequestCOFVersion + || mLastSkeletonSerialNum != gAgentAvatarp->mLastSkeletonSerialNum)) { // version mismatch in comparison to initial outfit - outfit changed mNotifyOutfitLoading = true; @@ -224,15 +238,6 @@ void LLAvatarRenderNotifier::updateNotificationAgent(U32 agentComplexity) // Some users can't see agent already, notify user about complexity growth mNotifyOutfitLoading = true; } - else if (gAgentAvatarp->mLastRezzedStatus >= rez_status) - { - rez_status = gAgentAvatarp->mLastRezzedStatus; - } - else - { - // rez status decreased - outfit related action was initiated - mNotifyOutfitLoading = true; - } if (!mNotifyOutfitLoading) { diff --git a/indra/newview/llavatarrendernotifier.h b/indra/newview/llavatarrendernotifier.h index 2949af2c01..3df8d38210 100644 --- a/indra/newview/llavatarrendernotifier.h +++ b/indra/newview/llavatarrendernotifier.h @@ -44,6 +44,7 @@ public: bool isNotificationVisible(); void updateNotificationRegion(U32 agentcount, U32 overLimit); + void updateNotificationState(); void updateNotificationAgent(U32 agentComplexity); private: @@ -67,8 +68,13 @@ private: F32 mLatestOverLimitPct; bool mShowOverLimitAgents; - bool mNotifyOutfitLoading; std::string overLimitMessage(); + + // initial outfit related variables (state control) + bool mNotifyOutfitLoading; + S32 mInitialCofVersion; + S32 mInitialOtfitRezStatus; + S32 mLastSkeletonSerialNum; }; #endif /* ! defined(LL_llavatarrendernotifier_H) */ diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 60fd98b3d7..3e20fbecdb 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6458,15 +6458,10 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) mFullyLoadedInitialized = TRUE; mFullyLoadedFrameCounter++; - if (changed) + if (isSelf()) { - static LLCachedControl<U32> show_my_complexity_changes(gSavedSettings, "ShowMyComplexityChanges", 20); - - if (isSelf() && show_my_complexity_changes) - { - // to know about outfit switching - LLAvatarRenderNotifier::getInstance()->updateNotificationAgent(mVisualComplexity); - } + // to know about outfit switching + LLAvatarRenderNotifier::getInstance()->updateNotificationState(); } return changed; |