From de2c88ca4334886ab48b3c3d474c6585036edb21 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 22 Mar 2013 12:17:06 -0400 Subject: Moved LastUpdateCOF stuff to avatar, so we can track last received for non-self avs --- indra/newview/llvoavatar.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) mode change 100644 => 100755 indra/newview/llvoavatar.cpp (limited to 'indra/newview/llvoavatar.cpp') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp old mode 100644 new mode 100755 index bc86bfd0a1..d492524789 --- 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); -- cgit v1.2.3