1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 09:05:19 +02: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
23 changed files with 345 additions and 35 deletions

View File

@@ -1415,6 +1415,17 @@ void Client::sendHaveMedia(const std::vector<u32> &tokens)
Send(&pkt);
}
void Client::sendUpdateClientInfo(const ClientDynamicInfo& info)
{
NetworkPacket pkt(TOSERVER_UPDATE_CLIENT_INFO, 4*2 + 4 + 4 + 4*2);
pkt << (u32)info.render_target_size.X << (u32)info.render_target_size.Y;
pkt << info.real_gui_scaling;
pkt << info.real_hud_scaling;
pkt << (f32)info.max_fs_size.X << (f32)info.max_fs_size.Y;
Send(&pkt);
}
void Client::removeNode(v3s16 p)
{
std::map<v3s16, MapBlock*> modified_blocks;