aboutsummaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index b2709b6f0..6c4d9eea8 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1941,6 +1941,10 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
u32 dir = readU32(is);
v2f align = readV2F1000(is);
v2f offset = readV2F1000(is);
+ v3f world_pos;
+ try{
+ world_pos = readV3F1000(is);
+ }catch(SerializationError &e) {};
ClientEvent event;
event.type = CE_HUDADD;
@@ -1955,6 +1959,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
event.hudadd.dir = dir;
event.hudadd.align = new v2f(align);
event.hudadd.offset = new v2f(offset);
+ event.hudadd.world_pos = new v3f(world_pos);
m_client_event_queue.push_back(event);
}
else if(command == TOCLIENT_HUDRM)
@@ -1973,6 +1978,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
{
std::string sdata;
v2f v2fdata;
+ v3f v3fdata;
u32 intdata = 0;
std::string datastring((char *)&data[2], datasize - 2);
@@ -1986,6 +1992,8 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
v2fdata = readV2F1000(is);
else if (stat == HUD_STAT_NAME || stat == HUD_STAT_TEXT)
sdata = deSerializeString(is);
+ else if (stat == HUD_STAT_WORLD_POS)
+ v3fdata = readV3F1000(is);
else
intdata = readU32(is);
@@ -1994,6 +2002,7 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
event.hudchange.id = id;
event.hudchange.stat = (HudElementStat)stat;
event.hudchange.v2fdata = new v2f(v2fdata);
+ event.hudchange.v3fdata = new v3f(v3fdata);
event.hudchange.sdata = new std::string(sdata);
event.hudchange.data = intdata;
m_client_event_queue.push_back(event);