From a6b202ccbeeb91146ef0f9bc6381167b9d8decf0 Mon Sep 17 00:00:00 2001 From: Jose Carlos Date: Wed, 19 Feb 2014 10:01:15 +0100 Subject: [PATCH] My Avatar's display name is shown --- interface/src/avatar/Avatar.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 2b7cc94c86..91d91e7219 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -632,10 +632,20 @@ float Avatar::getPelvisToHeadLength() const { } void Avatar::setShowDisplayName(bool showDisplayName) { + // For myAvatar, the alpha update is not done (called in simulate for other avatars) + if (Application::getInstance()->getAvatar() == this) { + if (showDisplayName) { + _displayNameAlpha = DISPLAYNAME_ALPHA; + } else { + _displayNameAlpha = 0.0f; + } + } + if (showDisplayName) { _displayNameTargetAlpha = DISPLAYNAME_ALPHA; } else { _displayNameTargetAlpha = 0.0f; } + }