mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Added support to disable built-in HUD elements
This commit is contained in:
parent
33dd267fd9
commit
e703c5b81f
13 changed files with 138 additions and 11 deletions
|
@ -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 "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue