1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Clean up CAO nametag handling and remove deprecated AO_CMD

AO_CMD_UPDATE_NAMETAG_ATTRIBUTES was deprecated in
9eee3c3f46 (0.4.14)
This commit is contained in:
sfan5 2020-05-26 16:05:06 +02:00
parent db7c262ee8
commit 4c8e1c3200
5 changed files with 42 additions and 37 deletions

View file

@ -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();
}
}
}