From 373f1bfb4ab5e48a9538e5ee561eb41174725c1c Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Thu, 8 Mar 2018 22:03:45 +0100 Subject: Cleanup: drop Server::hudGetHotbarItemcount() Call directly accessible RemotePlayer::getHotbarItemcount() from server api --- src/script/lua_api/l_object.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/script') 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; } -- cgit v1.2.3