summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-05-21 18:58:39 +0200
committerest31 <MTest31@outlook.com>2015-05-21 19:01:46 +0200
commit9facb40738e7c51c838ad2ccffd96028862160cb (patch)
tree5a963ff0447ab3b4249e896142c904339ac4b1e6 /src
parent2853b40de13c69866595baf72186abb4e89e0489 (diff)
downloadminetest-9facb40738e7c51c838ad2ccffd96028862160cb.tar.gz
minetest-9facb40738e7c51c838ad2ccffd96028862160cb.tar.bz2
minetest-9facb40738e7c51c838ad2ccffd96028862160cb.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/content_cao.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/content_cao.cpp b/src/content_cao.cpp
index d80804d4a..9ee81e63f 100644
--- a/src/content_cao.cpp
+++ b/src/content_cao.cpp
@@ -1716,17 +1716,15 @@ 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
- if (version == 1) {
- m_nametag_color = readARGB8(is);
- if (m_textnode != NULL) {
- m_textnode->setTextColor(m_nametag_color);
-
- // Enforce hiding nametag,
- // because if freetype is enabled, a grey
- // shadow can remain.
- m_textnode->setVisible(m_nametag_color.getAlpha() > 0);
- }
+ readU8(is); // version
+ m_nametag_color = readARGB8(is);
+ if (m_textnode != NULL) {
+ m_textnode->setTextColor(m_nametag_color);
+
+ // Enforce hiding nametag,
+ // because if freetype is enabled, a grey
+ // shadow can remain.
+ m_textnode->setVisible(m_nametag_color.getAlpha() > 0);
}
}
}