diff options
author | est31 <MTest31@outlook.com> | 2015-11-22 16:15:47 +0100 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-11-22 16:49:20 +0100 |
commit | a4e3ed013611aead302a82836d5702640b2811a0 (patch) | |
tree | 916aaa2e4e0ef87db84398bb5721e0e27f892444 /src | |
parent | d7bbe81726f46b46d88b188298155dc7519ae1a4 (diff) | |
download | minetest-a4e3ed013611aead302a82836d5702640b2811a0.tar.gz minetest-a4e3ed013611aead302a82836d5702640b2811a0.tar.bz2 minetest-a4e3ed013611aead302a82836d5702640b2811a0.zip |
Update HUD flags on server like on client
Fixes bug for which commit
6c37e89f08f962eaba788a31f5d3c798ceaa65e6 "Fix old client showing duplicated health bar on new server"
by @sapier
laid the groundwork, where the server has
updated its copy of the hud flags without
respecting the mask.
Fixes #3395.
Diffstat (limited to 'src')
-rw-r--r-- | src/server.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp index f6faccb1f..86096055d 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -3034,7 +3034,8 @@ bool Server::hudSetFlags(Player *player, u32 flags, u32 mask) return false; SendHUDSetFlags(player->peer_id, flags, mask); - player->hud_flags = flags; + player->hud_flags &= ~mask; + player->hud_flags |= flags; PlayerSAO* playersao = player->getPlayerSAO(); |