diff --git a/mods/ENVIRONMENT/mcl_weather/rain.lua b/mods/ENVIRONMENT/mcl_weather/rain.lua index 191062bcd..7efc866bf 100644 --- a/mods/ENVIRONMENT/mcl_weather/rain.lua +++ b/mods/ENVIRONMENT/mcl_weather/rain.lua @@ -29,7 +29,7 @@ local psdef= { minpos = vector.new(-6,3,-6), maxpos = vector.new(6,15,6), minvel = vector.new(-vel,-falling_speed,-vel), - maxvel = math.random(vel,-falling_speed+vel,vel), + maxvel = vector.new(vel,-falling_speed+vel,vel), minacc = vector.new(0,0,0), maxacc = vector.new(0,-0.4,0), minexptime = 0.5, @@ -46,7 +46,7 @@ local psdef_backsplash= { minpos = vector.new(-3,-1,-3), maxpos = vector.new(3,0,3), minvel = vector.new(-vel,falling_speed*2,-vel), - maxvel = math.random(vel,falling_speed*2+vel,vel), + maxvel = vector.new(vel,falling_speed*2+vel,vel), minacc = vector.new(0,0,0), maxacc = vector.new(0,0,0), minexptime = 0.1, diff --git a/mods/ITEMS/mcl_shields/init.lua b/mods/ITEMS/mcl_shields/init.lua index 57701345d..f742bc760 100644 --- a/mods/ITEMS/mcl_shields/init.lua +++ b/mods/ITEMS/mcl_shields/init.lua @@ -183,8 +183,11 @@ local function set_interact(player, interact) local player_name = player:get_player_name() local privs = minetest.get_player_privs(player_name) if privs.interact ~= interact then - privs.interact = interact - minetest.set_player_privs(player_name, privs) + local meta = player:get_meta() + if meta:get_int("ineract_revoked") ~= 1 then + privs.interact = interact + minetest.set_player_privs(player_name, privs) + end end end diff --git a/mods/MISC/mcl_privs/init.lua b/mods/MISC/mcl_privs/init.lua index b0d7a5066..bbf75f37b 100644 --- a/mods/MISC/mcl_privs/init.lua +++ b/mods/MISC/mcl_privs/init.lua @@ -20,12 +20,26 @@ end) for _, action in pairs({"grant", "revoke"}) do minetest["register_on_priv_" .. action](function(name, _, priv) - if priv == "fly" then - local player = minetest.get_player_by_name(name) - if player then - local meta = player:get_meta() + local player = minetest.get_player_by_name(name) + if player then + local meta = player:get_meta() + + if priv == "fly" then meta:set_int("fly_changed", 1) end + + --[[ + so e.g. hackers who have been revoked of the interact privilege + will not automatically get the interact privilege through the mcl shields code back + ]] + + if priv == "interact" then + if action == "revoke" then + meta:set_int("ineract_revoked", 1) + else + meta:set_int("ineract_revoked", 0) + end + end end end) -end \ No newline at end of file +end