summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-08-25 17:51:35 -0400
committerOz Linden <oz@lindenlab.com>2015-08-25 17:51:35 -0400
commit206ef7a1562db19a4d8a41e55b7272c917f4b62c (patch)
tree269bacf70ea50e6242eecd2b9c9c55f84fe72c44 /indra/newview/llvovolume.cpp
parent75304b4ca81e3fdb9164ec607997a6c30616d8ca (diff)
MAINT-5560: Correct imposter rendering flaws for avatars that have not had any attachments
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");