mirror of
https://github.com/minetest/minetest.git
synced 2024-11-04 23:03:46 +01:00
Make nametags white again
Commit 11a96e4901ce54c4646e47866f7a66cd9034c16b 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).
This commit is contained in:
parent
20aa78cffb
commit
23984ef7f0
@ -1716,13 +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
|
u8 version = readU8(is); // forward compatibility
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* \pre punchitem != NULL
|
/* \pre punchitem != NULL
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user