summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp4
-rwxr-xr-xindra/newview/llvoavatar.cpp4
-rwxr-xr-xindra/newview/llvovolume.cpp18
3 files changed, 20 insertions, 6 deletions
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index da4b6cf806..2a4ec6d320 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -260,11 +260,11 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
{
info[KEY_WEIGHT] = avatar->getVisualComplexity();
}
- if (avatar->getAttachmentGeometryBytes() > 0)
+ if (avatar->getAttachmentGeometryBytes() >= 0)
{
info[KEY_GEOMETRY] = (S32) avatar->getAttachmentGeometryBytes();
}
- if (avatar->getAttachmentSurfaceArea() > 0.f)
+ if (avatar->getAttachmentSurfaceArea() >= 0.f)
{
info[KEY_SURFACE] = avatar->getAttachmentSurfaceArea();
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 1aa38e6bfa..0ffd8ad119 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -667,8 +667,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
LLAvatarAppearance(&gAgentWearables),
LLViewerObject(id, pcode, regionp),
mSpecialRenderMode(0),
- mAttachmentGeometryBytes(0),
- mAttachmentSurfaceArea(0.f),
+ mAttachmentGeometryBytes(-1),
+ mAttachmentSurfaceArea(-1.f),
mReportedVisualComplexity(-1),
mReportedAttachmentGeometryBytes(-1),
mReportedAttachmentSurfaceArea(-1.f),
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 4835ffcd8f..e3bd2b8621 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4998,8 +4998,22 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (pAvatarVO)
{
- pAvatarVO->mAttachmentGeometryBytes += group->mGeometryBytes;
- pAvatarVO->mAttachmentSurfaceArea += group->mSurfaceArea;
+ if (pAvatarVO->mAttachmentGeometryBytes < 0)
+ { // First time through value is -1
+ pAvatarVO->mAttachmentGeometryBytes = group->mGeometryBytes;
+ }
+ else
+ {
+ pAvatarVO->mAttachmentGeometryBytes += group->mGeometryBytes;
+ }
+ if (pAvatarVO->mAttachmentSurfaceArea < 0.f)
+ { // First time through value is -1
+ pAvatarVO->mAttachmentSurfaceArea = group->mSurfaceArea;
+ }
+ else
+ {
+ pAvatarVO->mAttachmentSurfaceArea += group->mSurfaceArea;
+ }
}
}