From 206ef7a1562db19a4d8a41e55b7272c917f4b62c Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 25 Aug 2015 17:51:35 -0400 Subject: MAINT-5560: Correct imposter rendering flaws for avatars that have not had any attachments --- indra/newview/llvovolume.cpp | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'indra/newview/llvovolume.cpp') 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"); -- cgit v1.2.3