diff options
author | Weblate <42@minetest.ru> | 2013-05-01 15:33:15 +0200 |
---|---|---|
committer | Weblate <42@minetest.ru> | 2013-05-01 15:33:15 +0200 |
commit | 97cddd1b960e3b60ce74ff9ad16307b39676144e (patch) | |
tree | 0547ab284acc0fdf8aad2a36643be6f78f786ef1 /src/game.cpp | |
parent | f1f2004cb9efb026625b192b404064c26ceb6d5f (diff) | |
parent | 898a4e441fc0245aaf4821ff5e3dad0daccda3b5 (diff) | |
download | minetest-97cddd1b960e3b60ce74ff9ad16307b39676144e.tar.gz minetest-97cddd1b960e3b60ce74ff9ad16307b39676144e.tar.bz2 minetest-97cddd1b960e3b60ce74ff9ad16307b39676144e.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index a2d94ac0a..189003e4c 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2106,6 +2106,8 @@ void the_game( delete event.hudadd.name; delete event.hudadd.scale; delete event.hudadd.text; + delete event.hudadd.align; + delete event.hudadd.offset; continue; } @@ -2118,6 +2120,8 @@ void the_game( e->number = event.hudadd.number; e->item = event.hudadd.item; e->dir = event.hudadd.dir; + e->align = *event.hudadd.align; + e->offset = *event.hudadd.offset; if (id == nhudelem) player->hud.push_back(e); @@ -2128,6 +2132,8 @@ void the_game( delete event.hudadd.name; delete event.hudadd.scale; delete event.hudadd.text; + delete event.hudadd.align; + delete event.hudadd.offset; } else if (event.type == CE_HUDRM) { @@ -2169,6 +2175,12 @@ void the_game( case HUD_STAT_DIR: e->dir = event.hudchange.data; break; + case HUD_STAT_ALIGN: + e->align = *event.hudchange.v2fdata; + break; + case HUD_STAT_OFFSET: + e->offset = *event.hudchange.v2fdata; + break; } delete event.hudchange.v2fdata; @@ -3058,7 +3070,7 @@ void the_game( /* Wielded tool */ - if(show_hud) + if(show_hud && (player->hud_flags & HUD_FLAG_WIELDITEM_VISIBLE)) { // Warning: This clears the Z buffer. camera.drawWieldedTool(); |