summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llagent.cpp49
-rwxr-xr-xindra/newview/llagent.h1
-rwxr-xr-xindra/newview/llvoavatar.cpp8
3 files changed, 54 insertions, 4 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 06a7a2f5c3..60873cf41f 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -4282,6 +4282,49 @@ void LLAgent::requestLeaveGodMode()
sendReliableMessage();
}
+extern void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value);
+extern std::string get_sequential_numbered_file_name(const std::string& prefix,
+ const std::string& suffix);
+
+// For debugging, trace agent state at times appearance message are sent out.
+void LLAgent::dumpSentAppearance(const std::string& dump_prefix)
+{
+ std::string outfilename = get_sequential_numbered_file_name(dump_prefix,".xml");
+
+ LLAPRFile outfile;
+ std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
+ outfile.open(fullpath, LL_APR_WB );
+ apr_file_t* file = outfile.getFileHandle();
+ if (!file)
+ {
+ return;
+ }
+ else
+ {
+ LL_DEBUGS("Avatar") << "dumping sent appearance message to " << fullpath << llendl;
+ }
+
+ LLVisualParam* appearance_version_param = gAgentAvatarp->getVisualParam(11000);
+ if (appearance_version_param)
+ {
+ F32 value = appearance_version_param->getWeight();
+ dump_visual_param(file, appearance_version_param, value);
+ }
+ for (LLAvatarAppearanceDictionary::Textures::const_iterator iter = LLAvatarAppearanceDictionary::getInstance()->getTextures().begin();
+ iter != LLAvatarAppearanceDictionary::getInstance()->getTextures().end();
+ ++iter)
+ {
+ const ETextureIndex index = iter->first;
+ const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = iter->second;
+ if (texture_dict->mIsBakedTexture)
+ {
+ LLTextureEntry* entry = gAgentAvatarp->getTE((U8) index);
+ const LLUUID& uuid = entry->getID();
+ apr_file_printf( file, "\t\t<texture te=\"%i\" uuid=\"%s\"/>\n", index, uuid.asString().c_str());
+ }
+ }
+}
+
//-----------------------------------------------------------------------------
// sendAgentSetAppearance()
//-----------------------------------------------------------------------------
@@ -4378,6 +4421,12 @@ void LLAgent::sendAgentSetAppearance()
// composites to false, and update mesh textures.
if (textures_current)
{
+ bool enable_verbose_dumps = gSavedSettings.getBOOL("DebugAvatarAppearanceMessage");
+ std::string dump_prefix = gAgentAvatarp->getFullname() + "_sent_appearance";
+ if (enable_verbose_dumps)
+ {
+ dumpSentAppearance(dump_prefix);
+ }
LL_INFOS("Avatar") << gAgentAvatarp->avString() << "TAT: Sending cached texture data" << LL_ENDL;
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
{
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 693c123851..306dc2d99c 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -845,6 +845,7 @@ private:
public:
void sendMessage(); // Send message to this agent's region
void sendReliableMessage();
+ void dumpSentAppearance(const std::string& dump_prefix);
void sendAgentSetAppearance();
void sendAgentDataUpdateRequest();
void sendAgentUserInfoRequest();
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 537bb70579..1ea1b027f0 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -6617,7 +6617,7 @@ void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
}
else
{
- llinfos << "xmlfile write handle obtained : " << fullpath << llendl;
+ LL_DEBUGS("Avatar") << "dumping appearance message to " << fullpath << llendl;
}
@@ -6758,18 +6758,18 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32
if (contents.mParamAppearanceVersion >= 0) // use visual param if available.
{
appearance_version = contents.mParamAppearanceVersion;
- LL_DEBUGS("Avatar") << "appversion set by appearance_version param: " << appearance_version << llendl;
}
if (contents.mAppearanceVersion >= 0)
{
appearance_version = contents.mAppearanceVersion;
- LL_DEBUGS("Avatar") << "appversion set by appearance_version field: " << appearance_version << llendl;
}
if (contents.mAppearanceVersion < 0) // still not set, go with 0.
{
appearance_version = 0;
- LL_DEBUGS("Avatar") << "appversion set by default: " << appearance_version << llendl;
}
+ LL_DEBUGS("Avatar") << "appearance version info - field " << contents.mAppearanceVersion
+ << " param: " << contents.mParamAppearanceVersion
+ << " final: " << appearance_version << llendl;
return true;
}