summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api/l_object.cpp')
-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;
}