MAINT-5570 limiting exposure of attachment manager

master
andreykproductengine 2015-09-21 20:36:21 +03:00
parent e28f920f9a
commit 47dfdff3c0
4 changed files with 12 additions and 8 deletions

View File

@ -421,6 +421,15 @@ void LLAttachmentsMgr::onDetachCompleted(const LLUUID& inv_item_id)
mQuestionableCOFLinks.addTime(inv_item_id);
}
bool LLAttachmentsMgr::isAttachmentStateComplete() const
{
return mPendingAttachments.empty()
&& mAttachmentRequests.empty()
&& mDetachRequests.empty()
&& mRecentlyArrivedAttachments.empty()
&& mQuestionableCOFLinks.empty();
}
// Check for attachments that are (a) linked in COF and (b) not
// attached to the avatar. This is a rotten function to have to
// include, because it runs the risk of either repeatedly spamming out

View File

@ -87,10 +87,7 @@ public:
void onDetachRequested(const LLUUID& inv_item_id);
void onDetachCompleted(const LLUUID& inv_item_id);
bool hasPendingAttachments() { return mPendingAttachments.size() > 0; }
bool hasAttachmentRequests() { return mAttachmentRequests.size() > 0; }
bool hasDetachRequests() { return mAttachmentRequests.size() > 0; }
bool hasRecentlyArrivedAttachments() { return mRecentlyArrivedAttachments.size() > 0; }
bool isAttachmentStateComplete() const;
private:

View File

@ -191,9 +191,7 @@ void LLAvatarRenderNotifier::updateNotificationState()
if (mInitialCofVersion < 0
&& gAgentWearables.areWearablesLoaded()
&& !LLAttachmentsMgr::getInstance()->hasPendingAttachments()
&& !LLAttachmentsMgr::getInstance()->hasAttachmentRequests()
&& !LLAttachmentsMgr::getInstance()->hasRecentlyArrivedAttachments())
&& LLAttachmentsMgr::getInstance()->isAttachmentStateComplete())
{
// cof formed
mInitialCofVersion = LLAppearanceMgr::instance().getCOFVersion();

View File

@ -6458,7 +6458,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
mFullyLoadedInitialized = TRUE;
mFullyLoadedFrameCounter++;
if (isSelf())
if (changed && isSelf())
{
// to know about outfit switching
LLAvatarRenderNotifier::getInstance()->updateNotificationState();