diff options
| author | Don Kjer <don@lindenlab.com> | 2012-08-02 22:54:01 +0000 | 
|---|---|---|
| committer | Don Kjer <don@lindenlab.com> | 2012-08-02 22:54:01 +0000 | 
| commit | dfce4c451c0b12f5836db1af0c26bffc316837fa (patch) | |
| tree | 5a4ca1381913b91dc6b3fdf2f658092e8afb3ffb | |
| parent | 6ae4802e6d3ed7aa67c4946c434850de3be5ffe3 (diff) | |
Added AppearanceData block to AvatarAppearance message
| -rw-r--r-- | indra/llmessage/message_prehash.cpp | 3 | ||||
| -rw-r--r-- | indra/llmessage/message_prehash.h | 3 | ||||
| -rwxr-xr-x | indra/newview/llvoavatar.cpp | 38 | ||||
| -rw-r--r-- | scripts/messages/message_template.msg | 6 | ||||
| -rw-r--r-- | scripts/messages/message_template.msg.sha1 | 2 | 
5 files changed, 33 insertions, 19 deletions
diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp index d7658862da..c3fa7ff048 100644 --- a/indra/llmessage/message_prehash.cpp +++ b/indra/llmessage/message_prehash.cpp @@ -1376,3 +1376,6 @@ char const* const _PREHASH_ProductSKU = LLMessageStringTable::getInstance()->get  char const* const _PREHASH_SeeAVs = LLMessageStringTable::getInstance()->getString("SeeAVs");  char const* const _PREHASH_AnyAVSounds = LLMessageStringTable::getInstance()->getString("AnyAVSounds");  char const* const _PREHASH_GroupAVSounds = LLMessageStringTable::getInstance()->getString("GroupAVSounds"); +char const* const _PREHASH_AppearanceData = LLMessageStringTable::getInstance()->getString("AppearanceData"); +char const* const _PREHASH_AppearanceVersion = LLMessageStringTable::getInstance()->getString("AppearanceVersion"); +char const* const _PREHASH_CofVersion = LLMessageStringTable::getInstance()->getString("CofVersion"); diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h index da2b613f53..9214682003 100644 --- a/indra/llmessage/message_prehash.h +++ b/indra/llmessage/message_prehash.h @@ -1376,4 +1376,7 @@ extern char const* const _PREHASH_ProductSKU;  extern char const* const _PREHASH_SeeAVs;  extern char const* const _PREHASH_AnyAVSounds;  extern char const* const _PREHASH_GroupAVSounds; +extern char const* const _PREHASH_AppearanceData; +extern char const* const _PREHASH_AppearanceVersion; +extern char const* const _PREHASH_CofVersion;  #endif diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index b7bb4e6b47..0d85666d88 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -192,8 +192,6 @@ const S32 MAX_BUBBLE_CHAT_UTTERANCES = 12;  const F32 CHAT_FADE_TIME = 8.0;  const F32 BUBBLE_CHAT_TIME = CHAT_FADE_TIME * 3.f; -const S32 SERVER_GENERATED_APPEARANCE = 359949045; -  const LLColor4 DUMMY_COLOR = LLColor4(0.5,0.5,0.5,1.0);  enum ERenderName @@ -7355,12 +7353,21 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )  	parseTEMessage(mesgsys, _PREHASH_ObjectData, -1, tec);  //	dumpAvatarTEs( "POST processAvatarAppearance()" ); -	// Extract COF Version field hacked into local texture id. -	LLUUID flags_id = ((LLUUID*)tec.image_data)[0]; -	S32 this_update_cof_version = (flags_id.mData[0] << 24) + (flags_id.mData[1] << 16) +(flags_id.mData[2] << 8) +flags_id.mData[3]; -	S32 message_type = (flags_id.mData[4] << 24) + (flags_id.mData[5] << 16) +(flags_id.mData[6] << 8) +flags_id.mData[7]; +	U8 appearance_version = 0; +	S32 this_update_cof_version = LLViewerInventoryCategory::VERSION_UNKNOWN; +	S32 last_update_request_cof_version = LLAppearanceMgr::instance().mLastUpdateRequestCOFVersion; +	// For future use: +	//U32 appearance_flags = 0; + +	if (mesgsys->has(_PREHASH_AppearanceData)) +	{ +		mesgsys->getU8Fast(_PREHASH_AppearanceData, _PREHASH_AppearanceVersion, appearance_version, 0); +		mesgsys->getS32Fast(_PREHASH_AppearanceData, _PREHASH_CofVersion, this_update_cof_version, 0); +		// For future use: +		//mesgsys->getU32Fast(_PREHASH_AppearanceData, _PREHASH_Flags, appearance_flags, 0); +	} -	if (message_type == SERVER_GENERATED_APPEARANCE) +	if (appearance_version > 0)  	{  		mUseServerBakes = true;  	} @@ -7369,19 +7376,14 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )  		mUseServerBakes = false;  	} -	S32 last_update_request_cof_version = LLAppearanceMgr::instance().mLastUpdateRequestCOFVersion; -  	// Check for stale update. -	if (isSelf() && mUseServerBakes) +	if (mUseServerBakes && isSelf() +		&& this_update_cof_version >= LLViewerInventoryCategory::VERSION_INITIAL +		&& this_update_cof_version < last_update_request_cof_version)  	{ -		if ((this_update_cof_version > 0) &&  -			(this_update_cof_version < last_update_request_cof_version)) -		{ -			llwarns << "Stale appearance update, wanted version " << last_update_request_cof_version -					<< ", got " << this_update_cof_version << llendl; -			return; -		} -		((LLUUID*)tec.image_data)[0].setNull(); +		llwarns << "Stale appearance update, wanted version " << last_update_request_cof_version +				<< ", got " << this_update_cof_version << llendl; +		return;  	}  	applyParsedTEMessage(tec); diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg index 2cb0a833d4..5b147db084 100644 --- a/scripts/messages/message_template.msg +++ b/scripts/messages/message_template.msg @@ -3571,6 +3571,12 @@ version 2.0  		VisualParam			Variable  		{	ParamValue		U8	}  	} +	{ +		AppearanceData		Variable +		{	AppearanceVersion	U8	} +		{	CofVersion			S32	} +		{	Flags				U32	} +	}  }  // AvatarSitResponse - response to a request to sit on an object diff --git a/scripts/messages/message_template.msg.sha1 b/scripts/messages/message_template.msg.sha1 index 6486d92851..9e3dd21fb0 100644 --- a/scripts/messages/message_template.msg.sha1 +++ b/scripts/messages/message_template.msg.sha1 @@ -1 +1 @@ -465164e1a07f63d68c4ad1f00c19805dfb6ee2d7
\ No newline at end of file +ac4e232bd595c8dd31bc67fd77bcf68d8e9e837c
\ No newline at end of file  | 
