Skip to content

Commit 23984ef

Browse files
committedMay 18, 2015
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).
1 parent 20aa78c commit 23984ef

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

Diff for: ‎src/content_cao.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -1716,10 +1716,12 @@ void GenericCAO::processMessage(const std::string &data)
17161716
m_armor_groups[name] = rating;
17171717
}
17181718
} else if (cmd == GENERIC_CMD_UPDATE_NAMETAG_ATTRIBUTES) {
1719-
//u8 version = readU8(is); // forward compatibility
1720-
m_nametag_color = readARGB8(is);
1721-
if (m_textnode != NULL) {
1722-
m_textnode->setTextColor(m_nametag_color);
1719+
u8 version = readU8(is); // forward compatibility
1720+
if (version == 1) {
Has conversations. Original line has conversations.
1721+
m_nametag_color = readARGB8(is);
1722+
if (m_textnode != NULL) {
1723+
m_textnode->setTextColor(m_nametag_color);
1724+
}
17231725
}
17241726
}
17251727
}

0 commit comments

Comments
 (0)
Please sign in to comment.