1
0
Fork 0

Fix for VoxeLibre

This commit is contained in:
grorp 2024-10-17 14:05:51 +02:00
parent 3954acdfb7
commit 88c3c4558b
1 changed files with 8 additions and 6 deletions

View File

@ -847,13 +847,15 @@ end)
-- This is necessary because get_player_window_information may return nil in -- This is necessary because get_player_window_information may return nil in
-- on_joinplayer. -- on_joinplayer.
-- (Also, Minetest plans to add support for toggling touchscreen mode in-game.) -- (Also, Minetest plans to add support for toggling touchscreen mode in-game.)
mcl_player.register_globalstep_slow(function(player) minetest.register_globalstep(function(dtime)
local name = player:get_player_name() for _, player in pairs(minetest.get_connected_players()) do
local name = player:get_player_name()
if minetest.is_creative_enabled(name) then if minetest.is_creative_enabled(name) then
local touch_enabled = is_touch_enabled(name) local touch_enabled = is_touch_enabled(name)
if touch_enabled ~= players[name].last_touch_enabled then if touch_enabled ~= players[name].last_touch_enabled then
mcl_inventory.set_creative_formspec(player) mcl_inventory.set_creative_formspec(player)
end
end end
end end
end) end)