aboutsummaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-09-03 19:51:40 +0200
committerPilzAdam <pilzadam@minetest.net>2013-09-05 00:21:16 +0200
commit7860097eda449f0bb99971a037967bd338441133 (patch)
treebcc66bcb45cb8753f2d82c22973c9fc867774cfa /src/client.cpp
parent5b518ed2feff28c9bf21ad940c1b211b72d71bd1 (diff)
downloadminetest-7860097eda449f0bb99971a037967bd338441133.tar.gz
minetest-7860097eda449f0bb99971a037967bd338441133.tar.bz2
minetest-7860097eda449f0bb99971a037967bd338441133.zip
Use player:set_hotbar_image() instead of hardcoded hotbar.png
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index ecbb32dd2..063dc4158 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2175,6 +2175,10 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
s32 hotbar_itemcount = readS32((u8*) value.c_str());
if(hotbar_itemcount > 0 && hotbar_itemcount <= HUD_HOTBAR_ITEMCOUNT_MAX)
player->hud_hotbar_itemcount = hotbar_itemcount;
+ } else if (param == HUD_PARAM_HOTBAR_IMAGE) {
+ ((LocalPlayer *) player)->hotbar_image = value;
+ } else if (param == HUD_PARAM_HOTBAR_SELECTED_IMAGE) {
+ ((LocalPlayer *) player)->hotbar_selected_image = value;
}
}
else