mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Cleanup: drop Server::hudGetHotbarImage()
Call directly accessible RemotePlayer::getHotbarImage() from server api & make it const ref
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user