summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorDiego Martínez <kaeza@users.sf.net>2013-04-24 07:52:46 -0300
committerPerttu Ahola <celeron55@gmail.com>2013-04-24 17:28:00 +0300
commite703c5b81f87550e636ebb1ebb1eb64027a44687 (patch)
treee79287f264f46aa1789c30afff0569f92296ca87 /src/client.cpp
parent33dd267fd9da1a89b44cd6eab590aadab0f4e335 (diff)
downloadminetest-e703c5b81f87550e636ebb1ebb1eb64027a44687.tar.gz
minetest-e703c5b81f87550e636ebb1ebb1eb64027a44687.tar.bz2
minetest-e703c5b81f87550e636ebb1ebb1eb64027a44687.zip
Added support to disable built-in HUD elements
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 12ced17fe..941e9e882 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2114,6 +2114,20 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
event.hudchange.data = intdata;
m_client_event_queue.push_back(event);
}
+ else if(command == TOCLIENT_HUD_BUILTIN_ENABLE)
+ {
+ std::string datastring((char *)&data[2], datasize - 2);
+ std::istringstream is(datastring, std::ios_base::binary);
+
+ u32 id = readU8(is);
+ bool flag = (readU8(is) ? true : false);
+
+ ClientEvent event;
+ event.type = CE_HUD_BUILTIN_ENABLE;
+ event.hudbuiltin.id = (HudBuiltinElement)id;
+ event.hudbuiltin.flag = flag;
+ m_client_event_queue.push_back(event);
+ }
else
{
infostream<<"Client: Ignoring unknown command "