diff options
author | Kahrl <kahrl@gmx.net> | 2013-05-04 02:08:52 +0200 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2013-05-26 00:23:33 +0200 |
commit | 96fe1de8322a57ad82fcab3540c1eb44f74b9989 (patch) | |
tree | 44bc5db4e9d002f2a1fb6506db72e390cabae249 /src/hud.cpp | |
parent | 730d316efe18c57760cd5ec518a6191ac271ce61 (diff) | |
download | hax-minetest-server-96fe1de8322a57ad82fcab3540c1eb44f74b9989.tar.gz hax-minetest-server-96fe1de8322a57ad82fcab3540c1eb44f74b9989.zip |
Add ObjectRef.hud_set_hotbar_itemcount and add TOCLIENT_HUD_SET_PARAM
Diffstat (limited to 'src/hud.cpp')
-rw-r--r-- | src/hud.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hud.cpp b/src/hud.cpp index 65c78ca50..a3ae38bcb 100644 --- a/src/hud.cpp +++ b/src/hud.cpp @@ -43,7 +43,6 @@ Hud::Hud(video::IVideoDriver *driver, gui::IGUIEnvironment* guienv, screensize = v2u32(0, 0); displaycenter = v2s32(0, 0); hotbar_imagesize = 48; - hotbar_itemcount = 8; tsrc = gamedef->getTextureSource(); @@ -286,6 +285,7 @@ void Hud::drawHotbar(v2s32 centerlowerpos, s32 halfheartcount, u16 playeritem) { return; } + s32 hotbar_itemcount = player->hud_hotbar_itemcount; s32 padding = hotbar_imagesize / 12; s32 width = hotbar_itemcount * (hotbar_imagesize + padding * 2); v2s32 pos = centerlowerpos - v2s32(width / 2, hotbar_imagesize + padding * 2); |