diff options
author | Oz Linden <oz@lindenlab.com> | 2015-08-25 17:51:35 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-08-25 17:51:35 -0400 |
commit | 206ef7a1562db19a4d8a41e55b7272c917f4b62c (patch) | |
tree | 269bacf70ea50e6242eecd2b9c9c55f84fe72c44 /indra/newview/llvoavatar.cpp | |
parent | 75304b4ca81e3fdb9164ec607997a6c30616d8ca (diff) |
MAINT-5560: Correct imposter rendering flaws for avatars that have not had any attachments
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 86db3689c7..303b677dcf 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -182,7 +182,7 @@ const F32 NAMETAG_UPDATE_THRESHOLD = 0.3f; const F32 NAMETAG_VERTICAL_SCREEN_OFFSET = 25.f; const F32 NAMETAG_VERT_OFFSET_WEIGHT = 0.17f; -const S32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0; +const U32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0; enum ERenderName { @@ -668,8 +668,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, LLAvatarAppearance(&gAgentWearables), LLViewerObject(id, pcode, regionp), mSpecialRenderMode(0), - mAttachmentGeometryBytes(-1), - mAttachmentSurfaceArea(-1.f), + mAttachmentGeometryBytes(0), + mAttachmentSurfaceArea(0.f), mReportedVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN), mTurning(FALSE), mLastSkeletonSerialNum( 0 ), @@ -8283,6 +8283,16 @@ void LLVOAvatar::idleUpdateRenderComplexity() } } +void LLVOAvatar::modifyAttachmentGeometryBytes(S32 delta) +{ + mAttachmentGeometryBytes = llmax(mAttachmentGeometryBytes + delta, 0); +} + +void LLVOAvatar::modifyAttachmentSurfaceArea(F32 delta) +{ + F32 newval = mAttachmentSurfaceArea + delta; + mAttachmentSurfaceArea = ( newval > 0.0 ? newval : 0.0 ); +} void LLVOAvatar::updateVisualComplexity() { |