summaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-18 19:25:07 +0200
committerGitHub <noreply@github.com>2017-08-18 19:25:07 +0200
commitfd3afbced5410639325e730d5710b8b5039b320e (patch)
tree72e7059aa256706062b9ce2cd9ec5b0df76f5ede /src/server.cpp
parentc42753338924bb29c61081c9f269772f89bcd808 (diff)
downloadminetest-fd3afbced5410639325e730d5710b8b5039b320e.tar.gz
minetest-fd3afbced5410639325e730d5710b8b5039b320e.tar.bz2
minetest-fd3afbced5410639325e730d5710b8b5039b320e.zip
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
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp11
1 files changed, 11 insertions, 0 deletions
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)
{