summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2011-01-10 16:07:03 -0500
committerprep <prep@lindenlab.com>2011-01-10 16:07:03 -0500
commit9c60d1da81ae711b702b83bb388083bc19702472 (patch)
tree64493dc1189c8eacb4b3cfc1af6c116c45f2957b
parente8423f150ffdd965da5b90ee625a8afc1519626f (diff)
Fix for SH-638
-rw-r--r--indra/newview/llvoavatar.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index ded3e36cf6..5f0b197510 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2895,10 +2895,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
}
LLVector3 name_position = idleUpdateNameTagPosition(root_pos_last);
- mNameText->setPositionAgent(name_position);
-
- idleUpdateNameTagText(new_name);
-
+ mNameText->setPositionAgent(name_position);
+ idleUpdateNameTagText(new_name);
idleUpdateNameTagAlpha(new_name, alpha);
}
@@ -3184,8 +3182,9 @@ void LLVOAvatar::invalidateNameTags()
if (avatar->isDead()) continue;
avatar->clearNameTag();
- }
- }
+
+ }
+}
// Compute name tag position during idle update
LLVector3 LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
@@ -3204,12 +3203,14 @@ LLVector3 LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
local_camera_up.scaleVec(mBodySize * 0.5f);
local_camera_at.scaleVec(mBodySize * 0.5f);
- LLVector3 name_position = mRoot.getWorldPosition() +
- (local_camera_up * root_rot) -
- (projected_vec(local_camera_at * root_rot, camera_to_av));
+ LLVector3 name_position = mRoot.getWorldPosition();
+ name_position[VZ] -= mPelvisToFoot;
+ name_position[VZ] += (mBodySize[VZ]* 0.5f);
+ name_position += (local_camera_up * root_rot) - (projected_vec(local_camera_at * root_rot, camera_to_av));
name_position += pixel_up_vec * 15.f;
+
return name_position;
- }
+}
void LLVOAvatar::idleUpdateNameTagAlpha(BOOL new_name, F32 alpha)
{