1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

New HUD element - waypoint.

This commit is contained in:
RealBadAngel 2014-01-26 21:31:59 +01:00
parent 3f0ee5d680
commit 21f1bec724
8 changed files with 85 additions and 9 deletions

View file

@ -3724,6 +3724,7 @@ void Server::SendHUDAdd(u16 peer_id, u32 id, HudElement *form)
writeU32(os, form->dir);
writeV2F1000(os, form->align);
writeV2F1000(os, form->offset);
writeV3F1000(os, form->world_pos);
// Make data buffer
std::string s = os.str();
@ -3767,6 +3768,9 @@ void Server::SendHUDChange(u16 peer_id, u32 id, HudElementStat stat, void *value
case HUD_STAT_TEXT:
os << serializeString(*(std::string *)value);
break;
case HUD_STAT_WORLD_POS:
writeV3F1000(os, *(v3f *)value);
break;
case HUD_STAT_NUMBER:
case HUD_STAT_ITEM:
case HUD_STAT_DIR: