1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Add minetest.get_player_window_information() (#12367)

This commit is contained in:
rubenwardy 2023-02-27 22:58:41 +00:00 committed by GitHub
parent fbbdae93ee
commit 39f4d26177
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 345 additions and 35 deletions

View file

@ -1303,6 +1303,17 @@ bool Server::getClientInfo(session_t peer_id, ClientInfo &ret)
return true;
}
const ClientDynamicInfo *Server::getClientDynamicInfo(session_t peer_id)
{
ClientInterface::AutoLock clientlock(m_clients);
RemoteClient *client = m_clients.lockedGetClientNoEx(peer_id, CS_Invalid);
if (!client)
return nullptr;
return &client->getDynamicInfo();
}
void Server::handlePeerChanges()
{
while(!m_peer_change_queue.empty())