diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2018-03-08 22:06:48 +0100 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-03-08 23:00:17 +0100 |
commit | c7656edaa57a951f2496d454a42cdf899459b572 (patch) | |
tree | 2e594caa88d0014be8dfba655d9d95445c8f5bbc /src | |
parent | 4be46aeeb17c42718ecea14934e24d77772b4126 (diff) | |
download | minetest-c7656edaa57a951f2496d454a42cdf899459b572.tar.gz minetest-c7656edaa57a951f2496d454a42cdf899459b572.tar.bz2 minetest-c7656edaa57a951f2496d454a42cdf899459b572.zip |
Cleanup: drop Server::hudGetHotbarSelectedImage()
Call directly accessible RemotePlayer::getHotbarSelectedImage() from server api
Diffstat (limited to 'src')
-rw-r--r-- | src/script/lua_api/l_object.cpp | 2 | ||||
-rw-r--r-- | src/server.cpp | 5 | ||||
-rw-r--r-- | src/server.h | 1 |
3 files changed, 1 insertions, 7 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index 13b538f0c..03bd84d52 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -1519,7 +1519,7 @@ int ObjectRef::l_hud_get_hotbar_selected_image(lua_State *L) if (player == NULL) return 0; - const std::string &name = getServer(L)->hudGetHotbarSelectedImage(player); + const std::string &name = player->getHotbarSelectedImage(); lua_pushlstring(L, name.c_str(), name.size()); return 1; } diff --git a/src/server.cpp b/src/server.cpp index fbd656f37..75547c60b 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -3108,11 +3108,6 @@ void Server::hudSetHotbarSelectedImage(RemotePlayer *player, std::string name) SendHUDSetParam(player->getPeerId(), HUD_PARAM_HOTBAR_SELECTED_IMAGE, name); } -const std::string& Server::hudGetHotbarSelectedImage(RemotePlayer *player) const -{ - return player->getHotbarSelectedImage(); -} - Address Server::getPeerAddress(session_t peer_id) { return m_con->GetPeerAddress(peer_id); diff --git a/src/server.h b/src/server.h index 7b3fe61e2..3b9b72021 100644 --- a/src/server.h +++ b/src/server.h @@ -292,7 +292,6 @@ public: bool hudSetHotbarItemcount(RemotePlayer *player, s32 hotbar_itemcount); void hudSetHotbarImage(RemotePlayer *player, std::string name); void hudSetHotbarSelectedImage(RemotePlayer *player, std::string name); - const std::string &hudGetHotbarSelectedImage(RemotePlayer *player) const; Address getPeerAddress(session_t peer_id); |