Skip to content

Commit

Permalink
Enforce hide nametag
Browse files Browse the repository at this point in the history
Work around irrlicht bug and hide nametag if its alpha is set to 0.
Thanks @TeTpaAka for pointing out workaround.
  • Loading branch information
est31 committed May 18, 2015
1 parent 5b03857 commit b5f4179
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/content_cao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit b5f4179

Please sign in to comment.