summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llavatarrendernotifier.cpp33
-rw-r--r--indra/newview/llavatarrendernotifier.h8
2 files changed, 23 insertions, 18 deletions
diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp
index 53be573461..d3bc135b4c 100644
--- a/indra/newview/llavatarrendernotifier.cpp
+++ b/indra/newview/llavatarrendernotifier.cpp
@@ -62,8 +62,8 @@ mLatestAgentComplexity(0),
mLatestOverLimitPct(0.0f),
mShowOverLimitAgents(false),
mNotifyOutfitLoading(false),
-mInitialCofVersion(-1),
-mInitialOtfitRezStatus(-1),
+mLastCofVersion(-1),
+mLastOutfitRezStatus(-1),
mLastSkeletonSerialNum(-1)
{
mPopUpDelayTimer.resetWithExpiry(OVER_LIMIT_UPDATE_DELAY);
@@ -189,24 +189,32 @@ void LLAvatarRenderNotifier::updateNotificationState()
return;
}
- if (mInitialCofVersion < 0
+ // Don't use first provided COF and Sceleton versions - let them load anf 'form' first
+ if (mLastCofVersion < 0
&& gAgentWearables.areWearablesLoaded()
&& LLAttachmentsMgr::getInstance()->isAttachmentStateComplete())
{
// cof formed
- mInitialCofVersion = LLAppearanceMgr::instance().getCOFVersion();
+ mLastCofVersion = LLAppearanceMgr::instance().getCOFVersion();
mLastSkeletonSerialNum = gAgentAvatarp->mLastSkeletonSerialNum;
}
-
- if (gAgentAvatarp->mLastRezzedStatus >= mInitialOtfitRezStatus)
+ else if (mLastCofVersion >= 0
+ && (mLastCofVersion != gAgentAvatarp->mLastUpdateRequestCOFVersion
+ || mLastSkeletonSerialNum != gAgentAvatarp->mLastSkeletonSerialNum))
{
- mInitialOtfitRezStatus = gAgentAvatarp->mLastRezzedStatus;
+ // version mismatch in comparison to previous outfit - outfit changed
+ mNotifyOutfitLoading = true;
+ mLastCofVersion = LLAppearanceMgr::instance().getCOFVersion();
+ mLastSkeletonSerialNum = gAgentAvatarp->mLastSkeletonSerialNum;
}
- else
+
+ if (gAgentAvatarp->mLastRezzedStatus < mLastOutfitRezStatus)
{
// rez status decreased - outfit related action was initiated
mNotifyOutfitLoading = true;
}
+
+ mLastOutfitRezStatus = gAgentAvatarp->mLastRezzedStatus;
}
void LLAvatarRenderNotifier::updateNotificationAgent(U32 agentComplexity)
{
@@ -224,14 +232,7 @@ void LLAvatarRenderNotifier::updateNotificationAgent(U32 agentComplexity)
// We should not notify about initial outfit and it's load process without reason
updateNotificationState();
- if (mInitialCofVersion >= 0
- && (mInitialCofVersion != gAgentAvatarp->mLastUpdateRequestCOFVersion
- || mLastSkeletonSerialNum != gAgentAvatarp->mLastSkeletonSerialNum))
- {
- // version mismatch in comparison to initial outfit - outfit changed
- mNotifyOutfitLoading = true;
- }
- else if (mLatestOverLimitAgents > 0)
+ if (mLatestOverLimitAgents > 0)
{
// Some users can't see agent already, notify user about complexity growth
mNotifyOutfitLoading = true;
diff --git a/indra/newview/llavatarrendernotifier.h b/indra/newview/llavatarrendernotifier.h
index 3df8d38210..2a2704de28 100644
--- a/indra/newview/llavatarrendernotifier.h
+++ b/indra/newview/llavatarrendernotifier.h
@@ -72,9 +72,13 @@ private:
// initial outfit related variables (state control)
bool mNotifyOutfitLoading;
- S32 mInitialCofVersion;
- S32 mInitialOtfitRezStatus;
+
+ // COF (inventory folder) and Skeleton (voavatar) are used to spot changes in outfit.
+ S32 mLastCofVersion;
S32 mLastSkeletonSerialNum;
+ // Used to detect changes in voavatar's rezzed status.
+ // If value decreases - there were changes in outfit.
+ S32 mLastOutfitRezStatus;
};
#endif /* ! defined(LL_llavatarrendernotifier_H) */