summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rwxr-xr-xindra/newview/llvovolume.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 0432f6f27c..160e2fbdb3 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4703,10 +4703,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (pAvatarVO)
{
- pAvatarVO->mAttachmentGeometryBytes -= group->mGeometryBytes;
- pAvatarVO->mAttachmentGeometryBytes = llmax(pAvatarVO->mAttachmentGeometryBytes, 0);
- pAvatarVO->mAttachmentSurfaceArea -= group->mSurfaceArea;
- pAvatarVO->mAttachmentSurfaceArea = llmax(pAvatarVO->mAttachmentSurfaceArea, 0.f);
+ pAvatarVO->modifyAttachmentGeometryBytes( -group->mGeometryBytes );
+ pAvatarVO->modifyAttachmentSurfaceArea( -group->mSurfaceArea );
}
group->mGeometryBytes = 0;
@@ -5260,24 +5258,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
if (pAvatarVO)
{
- 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;
+ pAvatarVO->modifyAttachmentGeometryBytes( group->mGeometryBytes );
+ pAvatarVO->modifyAttachmentSurfaceArea( group->mSurfaceArea );
}
}
-}
static LLTrace::BlockTimerStatHandle FTM_REBUILD_MESH_FLUSH("Flush Mesh");