aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-05-18 22:41:22 +0200
committerest31 <MTest31@outlook.com>2015-05-18 23:10:48 +0200
commitd2ca662569427d36642660314668e416bf68f3c8 (patch)
tree8f7ccdb65fda7b172c04ebee04804d93276e477b
parent5b03857c625633e8daea3e0118bf701a93109127 (diff)
downloadminetest-d2ca662569427d36642660314668e416bf68f3c8.tar.gz
minetest-d2ca662569427d36642660314668e416bf68f3c8.tar.bz2
minetest-d2ca662569427d36642660314668e416bf68f3c8.zip
Enforce hiding nametag
Work around irrlicht bug and hide nametag if its alpha is set to 0. Thanks @TeTpaAka for pointing out workaround.
-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 b49c64ae8..d80804d4a 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -1721,6 +1721,11 @@ void GenericCAO::processMessage(const std::string &data)
m_nametag_color = readARGB8(is);
if (m_textnode != NULL) {
m_textnode->setTextColor(m_nametag_color);
+
+ // Enforce hiding nametag,
+ // because if freetype is enabled, a grey
+ // shadow can remain.
+ m_textnode->setVisible(m_nametag_color.getAlpha() > 0);
}
}
}