From 4be46aeeb17c42718ecea14934e24d77772b4126 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Thu, 8 Mar 2018 22:05:47 +0100 Subject: Cleanup: drop Server::hudGetHotbarImage() Call directly accessible RemotePlayer::getHotbarImage() from server api & make it const ref --- src/script/lua_api/l_object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/script') diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index ce2bce85e..13b538f0c 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -1490,7 +1490,7 @@ int ObjectRef::l_hud_get_hotbar_image(lua_State *L) if (player == NULL) return 0; - std::string name = getServer(L)->hudGetHotbarImage(player); + const std::string &name = player->getHotbarImage(); lua_pushlstring(L, name.c_str(), name.size()); return 1; } -- cgit v1.2.3