diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-06-26 14:19:26 +0100 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-06-26 14:19:26 +0100 |
commit | ee464c2f1607d689bd7cefe2bf8921332e651a52 (patch) | |
tree | d3c47693a00c2c66497017ec84250f5d3df16618 /indra/newview/llavatarrenderinfoaccountant.cpp | |
parent | e6739d80431091219b5b60b5b305d01a36bf8612 (diff) |
MAINT-8790 - ignore control avatars when fetching or sending complexity stats.
Diffstat (limited to 'indra/newview/llavatarrenderinfoaccountant.cpp')
-rw-r--r-- | indra/newview/llavatarrenderinfoaccountant.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 7c7f55f68c..ca83afb5ab 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -112,8 +112,13 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64 ) { LLUUID target_agent_id = LLUUID(agent_iter->first); - LLViewerObject* avatarp = gObjectList.findObject(target_agent_id); - if (avatarp && avatarp->isAvatar()) + LLViewerObject* vobjp = gObjectList.findObject(target_agent_id); + LLVOAvatar *avatarp = NULL; + if (vobjp) + { + avatarp = vobjp->asAvatar(); + } + if (avatarp && !avatarp->isControlAvatar()) { const LLSD & agent_info_map = agent_iter->second; if (agent_info_map.isMap()) @@ -123,7 +128,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoGetCoro(std::string url, U64 if (agent_info_map.has(KEY_WEIGHT)) { - ((LLVOAvatar *) avatarp)->setReportedVisualComplexity(agent_info_map[KEY_WEIGHT].asInteger()); + avatarp->setReportedVisualComplexity(agent_info_map[KEY_WEIGHT].asInteger()); } } else @@ -201,6 +206,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U if (avatar && avatar->getRezzedStatus() >= 2 && // Mostly rezzed (maybe without baked textures downloaded) !avatar->isDead() && // Not dead yet + !avatar->isControlAvatar() && // Not part of an animated object avatar->getObjectHost() == regionp->getHost()) // Ensure it's on the same region { avatar->calculateUpdateRenderComplexity(); // Make sure the numbers are up-to-date |