1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Generalize core.get/set_nametag_color into core.get/set_nametag_attributes

This commit is contained in:
TeTpaAka 2015-05-15 21:46:56 +02:00 committed by kwolekr
parent 5d1d7c17ea
commit 18c2f16c13
7 changed files with 36 additions and 26 deletions

View file

@ -170,12 +170,13 @@ std::string gob_cmd_update_attachment(int parent_id, std::string bone, v3f posit
return os.str();
}
std::string gob_cmd_set_nametag_color(video::SColor color)
std::string gob_cmd_update_nametag_attributes(video::SColor color)
{
std::ostringstream os(std::ios::binary);
// command
writeU8(os, GENERIC_CMD_SET_NAMETAG_COLOR);
writeU8(os, GENERIC_CMD_UPDATE_NAMETAG_ATTRIBUTES);
// parameters
writeU8(os, 1); // version for forward compatibility
writeARGB8(os, color);
return os.str();
}