diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2018-03-08 22:03:45 +0100 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-03-08 23:00:17 +0100 |
commit | 373f1bfb4ab5e48a9538e5ee561eb41174725c1c (patch) | |
tree | 1775b54fcf0ecd800f03ef842c11a05de27a1bc8 /src/script/lua_api | |
parent | f35236afea5c23c9aa3a038aac8562c509ad39c2 (diff) | |
download | minetest-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/lua_api')
-rw-r--r-- | src/script/lua_api/l_object.cpp | 4 |
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; } |