mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Enforce hiding nametag
Work around irrlicht bug and hide nametag if its alpha is set to 0. Thanks @TeTpaAka for pointing out workaround.
This commit is contained in:
parent
5b03857c62
commit
d2ca662569
1 changed files with 5 additions and 0 deletions
|
@ -1721,6 +1721,11 @@ void GenericCAO::processMessage(const std::string &data)
|
||||||
m_nametag_color = readARGB8(is);
|
m_nametag_color = readARGB8(is);
|
||||||
if (m_textnode != NULL) {
|
if (m_textnode != NULL) {
|
||||||
m_textnode->setTextColor(m_nametag_color);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue