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.
This commit is contained in:
parent
78c1bd6eff
commit
009e8b1058
|
@ -1716,8 +1716,7 @@ 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);
|
||||||
|
@ -1728,7 +1727,6 @@ void GenericCAO::processMessage(const std::string &data)
|
||||||
m_textnode->setVisible(m_nametag_color.getAlpha() > 0);
|
m_textnode->setVisible(m_nametag_color.getAlpha() > 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* \pre punchitem != NULL
|
/* \pre punchitem != NULL
|
||||||
|
|
Loading…
Reference in New Issue