Skip to content
Permalink
Browse files
Make nametags white again
Commit 11a96e4
commented out version parsing, resulting in the version byte being parsed as part of the color,
making nametags dark grey.
Re-introduces version parsing and ignores the packet if the version is more recent than ours,
fixing the unused variable warning (should have been done anyway).
  • Loading branch information
est31 committed May 18, 2015
1 parent 20aa78c commit ba92f977792a9bdb0d5607623791a4096ec8b057
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Binary file not shown.
@@ -1716,10 +1716,12 @@ void GenericCAO::processMessage(const std::string &data)
m_armor_groups[name] = rating;
}
} else if (cmd == GENERIC_CMD_UPDATE_NAMETAG_ATTRIBUTES) {
//u8 version = readU8(is); // forward compatibility
m_nametag_color = readARGB8(is);
if (m_textnode != NULL) {
m_textnode->setTextColor(m_nametag_color);
u8 version = readU8(is); // forward compatibility
if (version == 1) {
m_nametag_color = readARGB8(is);
if (m_textnode != NULL) {
m_textnode->setTextColor(m_nametag_color);
}
}
}
}

0 comments on commit ba92f97

Please sign in to comment.