Skip to content
Snippets Groups Projects
Commit 9facb407 authored by est31's avatar est31
Browse files

Don't ignore nametag attribute change message for newer versions

This allows newer versions to add additional information that isn't
read by us, but still in a backwards compatible manner.
parent 2853b40d
No related branches found
No related tags found
No related merge requests found
...@@ -1716,17 +1716,15 @@ void GenericCAO::processMessage(const std::string &data) ...@@ -1716,17 +1716,15 @@ void GenericCAO::processMessage(const std::string &data)
m_armor_groups[name] = rating; m_armor_groups[name] = rating;
} }
} else if (cmd == GENERIC_CMD_UPDATE_NAMETAG_ATTRIBUTES) { } else if (cmd == GENERIC_CMD_UPDATE_NAMETAG_ATTRIBUTES) {
u8 version = readU8(is); // forward compatibility readU8(is); // version
if (version == 1) { 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,
// Enforce hiding nametag, // because if freetype is enabled, a grey
// because if freetype is enabled, a grey // shadow can remain.
// shadow can remain. m_textnode->setVisible(m_nametag_color.getAlpha() > 0);
m_textnode->setVisible(m_nametag_color.getAlpha() > 0);
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment