summaryrefslogtreecommitdiff
path: root/src/content_cao.cpp
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-10-15 23:46:03 +0200
committerest31 <MTest31@outlook.com>2015-10-15 23:46:03 +0200
commitb600bc30a9fbd92800dabad14a38f28f0ccdd28e (patch)
tree64a685081f46eeb7f003dc4eef872fadccad9b91 /src/content_cao.cpp
parent5d88501a5799dbee8623ce9920423948659368fa (diff)
downloadminetest-b600bc30a9fbd92800dabad14a38f28f0ccdd28e.tar.gz
minetest-b600bc30a9fbd92800dabad14a38f28f0ccdd28e.tar.bz2
minetest-b600bc30a9fbd92800dabad14a38f28f0ccdd28e.zip
Fix enforcing of nametag hiding
Commit d2ca662569427d36642660314668e416bf68f3c8 "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.
Diffstat (limited to 'src/content_cao.cpp')
-rw-r--r--src/content_cao.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index b3f90aa9c..e864063a4 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -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();