diff options
-rwxr-xr-x[-rw-r--r--] | indra/newview/llappearancemgr.cpp | 29 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/llappearancemgr.h | 9 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/llvoavatar.cpp | 20 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/llvoavatar.h | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/llvoavatarself.cpp | 0 |
5 files changed, 29 insertions, 40 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c04d6bad94..59e07cd843 100644..100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1191,21 +1191,6 @@ S32 LLAppearanceMgr::getCOFVersion() const } } -S32 LLAppearanceMgr::getLastUpdateRequestCOFVersion() const -{ - return mLastUpdateRequestCOFVersion; -} - -S32 LLAppearanceMgr::getLastAppearanceUpdateCOFVersion() const -{ - return mLastAppearanceUpdateCOFVersion; -} - -void LLAppearanceMgr::setLastAppearanceUpdateCOFVersion(S32 new_val) -{ - mLastAppearanceUpdateCOFVersion = new_val; -} - const LLViewerInventoryItem* LLAppearanceMgr::getBaseOutfitLink() { const LLUUID& current_outfit_cat = getCOF(); @@ -3275,8 +3260,8 @@ void LLAppearanceMgr::requestServerAppearanceUpdate(LLCurl::ResponderPtr respond responder_ptr = new RequestAgentUpdateAppearanceResponder; } LLHTTPClient::post(url, body, responder_ptr); - llassert(cof_version >= mLastUpdateRequestCOFVersion); - mLastUpdateRequestCOFVersion = cof_version; + llassert(cof_version >= gAgentAvatarp->mLastUpdateRequestCOFVersion); + gAgentAvatarp->mLastUpdateRequestCOFVersion = cof_version; } class LLIncrementCofVersionResponder : public LLHTTPClient::Responder @@ -3296,12 +3281,10 @@ public: llinfos << "Successfully incremented agent's COF." << llendl; S32 new_version = pContent["category"]["version"].asInteger(); - LLAppearanceMgr* app_mgr = LLAppearanceMgr::getInstance(); - // cof_version should have increased - llassert(new_version > app_mgr->mLastUpdateRequestCOFVersion); + llassert(new_version > gAgentAvatarp->mLastUpdateRequestCOFVersion); - app_mgr->mLastUpdateRequestCOFVersion = new_version; + gAgentAvatarp->mLastUpdateRequestCOFVersion = new_version; } virtual void errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& content) { @@ -3553,9 +3536,7 @@ LLAppearanceMgr::LLAppearanceMgr(): mAttachmentInvLinkEnabled(false), mOutfitIsDirty(false), mOutfitLocked(false), - mIsInUpdateAppearanceFromCOF(false), - mLastUpdateRequestCOFVersion(LLViewerInventoryCategory::VERSION_UNKNOWN), - mLastAppearanceUpdateCOFVersion(LLViewerInventoryCategory::VERSION_UNKNOWN) + mIsInUpdateAppearanceFromCOF(false) { LLOutfitObserver& outfit_observer = LLOutfitObserver::instance(); diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index d49f5d6c15..46252afbde 100644..100755 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -97,15 +97,6 @@ public: // Debugging - get truncated LLSD summary of COF contents. LLSD dumpCOF() const; - // COF version of last viewer-initiated appearance update request. - S32 mLastUpdateRequestCOFVersion; - S32 getLastUpdateRequestCOFVersion() const; - - // COF version of last appearance message received for self av. - S32 mLastAppearanceUpdateCOFVersion; - S32 getLastAppearanceUpdateCOFVersion() const; - void setLastAppearanceUpdateCOFVersion(S32 new_val); - // Finds the folder link to the currently worn outfit const LLViewerInventoryItem *getBaseOutfitLink(); bool getBaseOutfitName(std::string &name); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index bc86bfd0a1..d492524789 100644..100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -707,7 +707,9 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mLastRezzedStatus(-1), mIsEditingAppearance(FALSE), mUseLocalAppearance(FALSE), - mUseServerBakes(FALSE) // FIXME DRANO consider using boost::optional, defaulting to unknown. + mUseServerBakes(FALSE), // FIXME DRANO consider using boost::optional, defaulting to unknown. + mLastUpdateRequestCOFVersion(-1), + mLastUpdateReceivedCOFVersion(-1) { //VTResume(); // VTune @@ -3006,11 +3008,11 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) mUseServerBakes, central_bake_version); std::string origin_string = bakedTextureOriginInfo(); debug_line += " [" + origin_string + "]"; + S32 curr_cof_version = LLAppearanceMgr::instance().getCOFVersion(); + S32 last_request_cof_version = mLastUpdateRequestCOFVersion; + S32 last_received_cof_version = mLastUpdateReceivedCOFVersion; if (isSelf()) { - S32 curr_cof_version = LLAppearanceMgr::instance().getCOFVersion(); - S32 last_request_cof_version = LLAppearanceMgr::instance().getLastUpdateRequestCOFVersion(); - S32 last_received_cof_version = LLAppearanceMgr::instance().getLastAppearanceUpdateCOFVersion(); debug_line += llformat(" - cof: %d req: %d rcv:%d", curr_cof_version, last_request_cof_version, last_received_cof_version); if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure")) @@ -3018,6 +3020,10 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) debug_line += " FORCING ERRS"; } } + else + { + debug_line += llformat(" - cof rcv:%d", last_received_cof_version); + } addDebugText(debug_line); } if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked")) @@ -6951,7 +6957,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) return; } S32 this_update_cof_version = contents.mCOFVersion; - S32 last_update_request_cof_version = LLAppearanceMgr::instance().mLastUpdateRequestCOFVersion; + S32 last_update_request_cof_version = mLastUpdateRequestCOFVersion; // Only now that we have result of appearance_version can we decide whether to bail out. if( isSelf() ) @@ -6960,8 +6966,6 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) << " last_update_request_cof_version " << last_update_request_cof_version << " my_cof_version " << LLAppearanceMgr::instance().getCOFVersion() << llendl; - LLAppearanceMgr::instance().setLastAppearanceUpdateCOFVersion(this_update_cof_version); - if (getRegion() && (getRegion()->getCentralBakeVersion()==0)) { llwarns << avString() << "Received AvatarAppearance message for self in non-server-bake region" << llendl; @@ -7003,6 +7007,8 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys ) return; } + mLastUpdateReceivedCOFVersion = this_update_cof_version; + setIsUsingServerBakes(appearance_version > 0); applyParsedTEMessage(contents.mTEContents); diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 3a4cfa5800..c2adaac18e 100644..100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -962,6 +962,17 @@ protected: LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez LLFrameTimer mDebugExistenceTimer; // Debugging for how long the avatar has been in memory. + //-------------------------------------------------------------------- + // COF monitoring + //-------------------------------------------------------------------- + +public: + // COF version of last viewer-initiated appearance update request. For non-self avs, this will remain at default. + S32 mLastUpdateRequestCOFVersion; + + // COF version of last appearance message received for this av. + S32 mLastUpdateReceivedCOFVersion; + /** Diagnostics ** ** *******************************************************************************/ diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index d60ce6799b..d60ce6799b 100644..100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp |