mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-29 12:15:18 +01:00
Add minetest.get_player_window_information() (#12367)
This commit is contained in:
@@ -40,6 +40,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "util/pointedthing.h"
|
||||
#include "util/serialize.h"
|
||||
#include "util/srp.h"
|
||||
#include "clientdynamicinfo.h"
|
||||
|
||||
void Server::handleCommand_Deprecated(NetworkPacket* pkt)
|
||||
{
|
||||
@@ -1841,3 +1842,18 @@ void Server::handleCommand_HaveMedia(NetworkPacket *pkt)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Server::handleCommand_UpdateClientInfo(NetworkPacket *pkt)
|
||||
{
|
||||
ClientDynamicInfo info;
|
||||
*pkt >> info.render_target_size.X;
|
||||
*pkt >> info.render_target_size.Y;
|
||||
*pkt >> info.real_gui_scaling;
|
||||
*pkt >> info.real_hud_scaling;
|
||||
*pkt >> info.max_fs_size.X;
|
||||
*pkt >> info.max_fs_size.Y;
|
||||
|
||||
session_t peer_id = pkt->getPeerId();
|
||||
RemoteClient *client = getClient(peer_id, CS_Invalid);
|
||||
client->setDynamicInfo(info);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user