From fd3afbced5410639325e730d5710b8b5039b320e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Fri, 18 Aug 2017 19:25:07 +0200 Subject: Optimize headers (part 2) (#6272) * Optimize headers (part 2) * less debug.h in headers * less remoteplayer.h for everybody * Cleanup (part 2) * camera.h: mesh.h * mapgen.h: mapnode.h * serverenvironment.h: mapblock.h * nodedef.h: shader.h --- src/server.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index 685f1f667..c74cc5394 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -62,6 +62,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "database.h" #include "chatmessage.h" #include "chat_interface.h" +#include "remoteplayer.h" class ClientNotFoundException : public BaseException { @@ -3122,6 +3123,11 @@ bool Server::hudSetHotbarItemcount(RemotePlayer *player, s32 hotbar_itemcount) return true; } +s32 Server::hudGetHotbarItemcount(RemotePlayer *player) const +{ + return player->getHotbarItemcount(); +} + void Server::hudSetHotbarImage(RemotePlayer *player, std::string name) { if (!player) @@ -3147,6 +3153,11 @@ void Server::hudSetHotbarSelectedImage(RemotePlayer *player, std::string name) SendHUDSetParam(player->peer_id, HUD_PARAM_HOTBAR_SELECTED_IMAGE, name); } +const std::string& Server::hudGetHotbarSelectedImage(RemotePlayer *player) const +{ + return player->getHotbarSelectedImage(); +} + bool Server::setLocalPlayerAnimations(RemotePlayer *player, v2s32 animation_frames[4], f32 frame_speed) { -- cgit v1.2.3