Workaround conflict between stealth and watch.

This commit is contained in:
Aaron Suen 2019-12-12 19:31:34 -05:00
parent acedfe4d15
commit 0968d680e3

View File

@ -61,6 +61,17 @@ minetest.register_privilege("stealth", {
minetest.register_on_joinplayer(updatevisible)
local timer = 0
minetest.register_globalstep(function(dtime)
timer = timer - dtime
if timer <= 0 then
for _, player in pairs(minetest.get_connected_players()) do
if isstealth(player) then updatevisible(player) end
end
timer = 1
end
end)
local hooked
local function chathook()
if minetest.chat_send_all == hooked then return end