Skip to content

Commit

Permalink
Fix enforcing of nametag hiding
Browse files Browse the repository at this point in the history
Commit

d2ca662 "Enforce hiding nametag"

didn't fix the issue for "client" instances, where the nametag update
was received before the object was added to the scene. This resulted
in the grey shadow on the nametag that commit tried to fix.

Thanks to @neoascetic for pointing out that there still is a shadow.
  • Loading branch information
est31 committed Oct 15, 2015
1 parent 5d88501 commit b600bc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/content_cao.cpp
Expand Up @@ -975,6 +975,11 @@ void GenericCAO::addToScene(scene::ISceneManager *smgr, ITextureSource *tsrc,
wname.c_str(), m_nametag_color, node);
m_textnode->grab();
m_textnode->setPosition(v3f(0, BS*1.1, 0));

// Enforce hiding nametag,
// because if freetype is enabled, a grey
// shadow can remain.
m_textnode->setVisible(m_nametag_color.getAlpha() > 0);
}

updateNodePos();
Expand Down

0 comments on commit b600bc3

Please sign in to comment.