diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-10-11 14:16:39 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-10-11 14:16:39 +0100 |
commit | 299592e88e90d0942ba29e1edfa8b72691489e00 (patch) | |
tree | 7f14e8fce6e7824982233978833b8fe00384912c /indra/newview/llvoavatar.cpp | |
parent | aae13d1966b74adf59e1510bade8652f33e6867e (diff) | |
parent | b6d22de58850fc9a5b34eeb5b7930e5845bfc42d (diff) |
merge
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 63 |
1 files changed, 55 insertions, 8 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 874f20afe4..d6051e7c63 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3481,10 +3481,61 @@ void LLVOAvatar::updateDebugText() } if (motion_name.empty()) { + std::string name; + if (gAgent.isGodlikeWithoutAdminMenuFakery() || isSelf()) + { + name = motionp->getID().asString(); + LLVOAvatar::AnimSourceIterator anim_it = mAnimationSources.begin(); + for (; anim_it != mAnimationSources.end(); ++anim_it) + { + if (anim_it->second == motionp->getID()) + { + LLViewerObject* object = gObjectList.findObject(anim_it->first); + if (!object) + { + break; + } + if (object->isAvatar()) + { + if (mMotionController.mIsSelf) + { + // Searching inventory by asset id is really long + // so just mark as inventory + // Also item is likely to be named by LLPreviewAnim + name += "(inventory)"; + } + } + else + { + LLViewerInventoryItem* item = NULL; + if (!object->isInventoryDirty()) + { + item = object->getInventoryItemByAsset(motionp->getID()); + } + if (item) + { + name = item->getName(); + } + else if (object->isAttachment()) + { + name += "(" + getAttachmentItemName() + ")"; + } + else + { + // in-world object, name or content unknown + name += "(in-world)"; + } + } + break; + } + } + } + else + { + name = LLUUID::null.asString(); + } output = llformat("%s - %d", - gAgent.isGodlikeWithoutAdminMenuFakery() ? - motionp->getID().asString().c_str() : - LLUUID::null.asString().c_str(), + name.c_str(), (U32)motionp->getPriority()); } else @@ -5429,10 +5480,6 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id) if (use_new_walk_run) result = ANIM_AGENT_FEMALE_RUN_NEW; } - else if (id == ANIM_AGENT_SIT) - { - result = ANIM_AGENT_SIT_FEMALE; - } } else { @@ -8643,7 +8690,7 @@ void dump_sequential_xml(const std::string outprefix, const LLSD& content) { std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml"); std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename); - std::ofstream ofs(fullpath.c_str(), std::ios_base::out); + llofstream ofs(fullpath.c_str(), std::ios_base::out); ofs << LLSDOStreamer<LLSDXMLFormatter>(content, LLSDFormatter::OPTIONS_PRETTY); LL_DEBUGS("Avatar") << "results saved to: " << fullpath << LL_ENDL; } |