aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2018-03-08 22:03:45 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2018-03-08 23:00:17 +0100
commit373f1bfb4ab5e48a9538e5ee561eb41174725c1c (patch)
tree1775b54fcf0ecd800f03ef842c11a05de27a1bc8 /src/script
parentf35236afea5c23c9aa3a038aac8562c509ad39c2 (diff)
downloadminetest-373f1bfb4ab5e48a9538e5ee561eb41174725c1c.tar.gz
minetest-373f1bfb4ab5e48a9538e5ee561eb41174725c1c.tar.bz2
minetest-373f1bfb4ab5e48a9538e5ee561eb41174725c1c.zip
Cleanup: drop Server::hudGetHotbarItemcount()
Call directly accessible RemotePlayer::getHotbarItemcount() from server api
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_object.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp
index 3afd21ec3..ce2bce85e 100644
--- a/src/script/lua_api/l_object.cpp
+++ b/src/script/lua_api/l_object.cpp
@@ -1462,9 +1462,7 @@ int ObjectRef::l_hud_get_hotbar_itemcount(lua_State *L)
if (player == NULL)
return 0;
- s32 hotbar_itemcount = getServer(L)->hudGetHotbarItemcount(player);
-
- lua_pushnumber(L, hotbar_itemcount);
+ lua_pushnumber(L, player->getHotbarItemcount());
return 1;
}