From 7860097eda449f0bb99971a037967bd338441133 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Tue, 3 Sep 2013 19:51:40 +0200 Subject: Use player:set_hotbar_image() instead of hardcoded hotbar.png --- src/server.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index 8ce8df349..3bdf9c23d 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -4999,6 +4999,20 @@ bool Server::hudSetHotbarItemcount(Player *player, s32 hotbar_itemcount) { return true; } +void Server::hudSetHotbarImage(Player *player, std::string name) { + if (!player) + return; + + SendHUDSetParam(player->peer_id, HUD_PARAM_HOTBAR_IMAGE, name); +} + +void Server::hudSetHotbarSelectedImage(Player *player, std::string name) { + if (!player) + return; + + SendHUDSetParam(player->peer_id, HUD_PARAM_HOTBAR_SELECTED_IMAGE, name); +} + void Server::notifyPlayers(const std::wstring msg) { BroadcastChatMessage(msg); -- cgit v1.2.3