My Avatar's display name is shown

This commit is contained in:
Jose Carlos 2014-02-19 10:01:15 +01:00
parent 59f8851b50
commit a6b202ccbe

View file

@ -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;
}
}