mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Generalize core.get/set_nametag_color into core.get/set_nametag_attributes
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user