diff options
author | BlockMen <nmuelll@web.de> | 2015-11-20 23:46:33 +0100 |
---|---|---|
committer | BlockMen <nmuelll@web.de> | 2015-12-15 23:32:19 +0100 |
commit | 9eee3c3f465c071bb9908749cf48be3c131a1bdf (patch) | |
tree | 916b11e605c29b789db01d0c775dc0bc7c4c8983 /src/content_sao.cpp | |
parent | 19f73e4efc14622b4d020c9d373176cd7801e37f (diff) | |
download | minetest-9eee3c3f465c071bb9908749cf48be3c131a1bdf.tar.gz minetest-9eee3c3f465c071bb9908749cf48be3c131a1bdf.tar.bz2 minetest-9eee3c3f465c071bb9908749cf48be3c131a1bdf.zip |
Add option to give every object a nametag
or change the nametag text of players
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r-- | src/content_sao.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 0fa806c1a..0a1cfe770 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -757,8 +757,6 @@ PlayerSAO::PlayerSAO(ServerEnvironment *env_, Player *player_, u16 peer_id_, m_bone_position_sent(false), m_attachment_parent_id(0), m_attachment_sent(false), - m_nametag_color(video::SColor(255, 255, 255, 255)), - m_nametag_sent(false), // public m_physics_override_speed(1), m_physics_override_jump(1), @@ -857,7 +855,7 @@ std::string PlayerSAO::getClientInitializationData(u16 protocol_version) os<<serializeLongString(gob_cmd_update_physics_override(m_physics_override_speed, m_physics_override_jump, m_physics_override_gravity, m_physics_override_sneak, m_physics_override_sneak_glitch)); // 5 - os << serializeLongString(gob_cmd_update_nametag_attributes(m_nametag_color)); // 6 + os << serializeLongString(gob_cmd_update_nametag_attributes(m_prop.nametag_color)); // 6 (GENERIC_CMD_UPDATE_NAMETAG_ATTRIBUTES) : Deprecated, for backwards compatibility only. } else { @@ -1012,14 +1010,6 @@ void PlayerSAO::step(float dtime, bool send_recommended) ActiveObjectMessage aom(getId(), true, str); m_messages_out.push(aom); } - - if (m_nametag_sent == false) { - m_nametag_sent = true; - std::string str = gob_cmd_update_nametag_attributes(m_nametag_color); - // create message and add to list - ActiveObjectMessage aom(getId(), true, str); - m_messages_out.push(aom); - } } void PlayerSAO::setBasePosition(const v3f &position) @@ -1270,17 +1260,6 @@ void PlayerSAO::notifyObjectPropertiesModified() m_properties_sent = false; } -void PlayerSAO::setNametagColor(video::SColor color) -{ - m_nametag_color = color; - m_nametag_sent = false; -} - -video::SColor PlayerSAO::getNametagColor() -{ - return m_nametag_color; -} - Inventory* PlayerSAO::getInventory() { return m_inventory; @@ -1396,4 +1375,3 @@ bool PlayerSAO::getCollisionBox(aabb3f *toset) { bool PlayerSAO::collideWithObjects(){ return true; } - |