forked from MineClone5/MineClone5
set privs only when changed
setting privileges causes mt to write to the player db. this changes shields so it only sets the interact privilege when it has actually changed.
This commit is contained in:
parent
5e58e71602
commit
8bfa248ef7
|
@ -182,8 +182,10 @@ end
|
||||||
local function set_interact(player, interact)
|
local function set_interact(player, interact)
|
||||||
local player_name = player:get_player_name()
|
local player_name = player:get_player_name()
|
||||||
local privs = minetest.get_player_privs(player_name)
|
local privs = minetest.get_player_privs(player_name)
|
||||||
privs.interact = interact
|
if privs.interact ~= interact then
|
||||||
minetest.set_player_privs(player_name, privs)
|
privs.interact = interact
|
||||||
|
minetest.set_player_privs(player_name, privs)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local shield_hud = {}
|
local shield_hud = {}
|
||||||
|
|
Loading…
Reference in New Issue