diff options
author | simon <none@none> | 2013-07-02 16:04:31 -0700 |
---|---|---|
committer | simon <none@none> | 2013-07-02 16:04:31 -0700 |
commit | f41c8f53412b3ca8500e72d9cde8e70ca0bc266e (patch) | |
tree | ddd78feaf6059d3ac2149b4f91eb39044a08ceec /indra/newview/llvovolume.cpp | |
parent | 9e5b4db92883bf27dc49d4c4af948ca0048f143c (diff) |
MAINT-2808 Viewer side : Stats for OBJECT_ATTACHMENT_GEOMETRY_BYTES and OBJECT_ATTACHMENT_SURFACE_AREA
do not return to the 'no attachments' values after avatar removes last attachment
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rwxr-xr-x | indra/newview/llvovolume.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
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; + } } } |