mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 22:36:57 +02:00
Hide name for all avatars, including MyAvatar
This commit is contained in:
parent
9a523a60cf
commit
a6a48aafdc
1 changed files with 6 additions and 1 deletions
|
@ -1027,6 +1027,11 @@ float Avatar::getPelvisToHeadLength() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Avatar::setShowDisplayName(bool showDisplayName) {
|
void Avatar::setShowDisplayName(bool showDisplayName) {
|
||||||
|
if (!Menu::getInstance()->isOptionChecked(MenuOption::NamesAboveHeads)) {
|
||||||
|
_displayNameAlpha = 0.0f;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// For myAvatar, the alpha update is not done (called in simulate for other avatars)
|
// For myAvatar, the alpha update is not done (called in simulate for other avatars)
|
||||||
if (Application::getInstance()->getAvatar() == this) {
|
if (Application::getInstance()->getAvatar() == this) {
|
||||||
if (showDisplayName) {
|
if (showDisplayName) {
|
||||||
|
@ -1036,7 +1041,7 @@ void Avatar::setShowDisplayName(bool showDisplayName) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showDisplayName && Menu::getInstance()->isOptionChecked(MenuOption::NamesAboveHeads)) {
|
if (showDisplayName) {
|
||||||
_displayNameTargetAlpha = DISPLAYNAME_ALPHA;
|
_displayNameTargetAlpha = DISPLAYNAME_ALPHA;
|
||||||
} else {
|
} else {
|
||||||
_displayNameTargetAlpha = 0.0f;
|
_displayNameTargetAlpha = 0.0f;
|
||||||
|
|
Loading…
Reference in a new issue