diff options
author | sfan5 <sfan5@live.de> | 2020-05-26 16:05:06 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2020-05-29 22:54:50 +0200 |
commit | 4c8e1c320054ee0dc5d8ec821a6b4cd69002aa09 (patch) | |
tree | 9095c1f66b051d84e6001c71bb1978a5fb83a3d1 /src/server | |
parent | db7c262ee85c5bcae68354280848218dbf14bf55 (diff) | |
download | minetest-4c8e1c320054ee0dc5d8ec821a6b4cd69002aa09.tar.gz minetest-4c8e1c320054ee0dc5d8ec821a6b4cd69002aa09.tar.bz2 minetest-4c8e1c320054ee0dc5d8ec821a6b4cd69002aa09.zip |
Clean up CAO nametag handling and remove deprecated AO_CMD
AO_CMD_UPDATE_NAMETAG_ATTRIBUTES was deprecated in
9eee3c3f465c071bb9908749cf48be3c131a1bdf (0.4.14)
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/player_sao.cpp | 4 | ||||
-rw-r--r-- | src/server/serveractiveobject.cpp | 13 |
2 files changed, 2 insertions, 15 deletions
diff --git a/src/server/player_sao.cpp b/src/server/player_sao.cpp index 3ea3536e2..9ea0743f7 100644 --- a/src/server/player_sao.cpp +++ b/src/server/player_sao.cpp @@ -127,9 +127,7 @@ std::string PlayerSAO::getClientInitializationData(u16 protocol_version) } msg_os << serializeLongString(generateUpdateAttachmentCommand()); // 4 msg_os << serializeLongString(generateUpdatePhysicsOverrideCommand()); // 5 - // (AO_CMD_UPDATE_NAMETAG_ATTRIBUTES) : Deprecated, for backwards compatibility only. - msg_os << serializeLongString(generateUpdateNametagAttributesCommand(m_prop.nametag_color)); // 6 - int message_count = 6 + m_bone_position.size(); + int message_count = 5 + m_bone_position.size(); for (std::unordered_set<int>::const_iterator ii = m_attachment_child_ids.begin(); ii != m_attachment_child_ids.end(); ++ii) { if (ServerActiveObject *obj = m_env->getActiveObject(*ii)) { diff --git a/src/server/serveractiveobject.cpp b/src/server/serveractiveobject.cpp index fdcb13bd8..dbf25e3bc 100644 --- a/src/server/serveractiveobject.cpp +++ b/src/server/serveractiveobject.cpp @@ -61,21 +61,10 @@ std::string ServerActiveObject::generateUpdateInfantCommand(u16 infant_id, u16 p return os.str(); } -std::string ServerActiveObject::generateUpdateNametagAttributesCommand(const video::SColor &color) const -{ - std::ostringstream os(std::ios::binary); - // command - writeU8(os, AO_CMD_UPDATE_NAMETAG_ATTRIBUTES); - // parameters - writeU8(os, 1); // version for forward compatibility - writeARGB8(os, color); - return os.str(); -} - void ServerActiveObject::dumpAOMessagesToQueue(std::queue<ActiveObjectMessage> &queue) { while (!m_messages_out.empty()) { queue.push(std::move(m_messages_out.front())); m_messages_out.pop(); } -}
\ No newline at end of file +} |