From: upsilon Date: Mon, 17 Apr 2017 10:56:27 +0000 (+0200) Subject: Doors: Ignore permission check if player parameter is omitted X-Git-Tag: 0.4.16~25 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6335525757c68e8697c0db992d9774d3c7febd01;p=oweals%2Fminetest_game.git Doors: Ignore permission check if player parameter is omitted As written in game_api.txt. --- diff --git a/mods/doors/init.lua b/mods/doors/init.lua index a1bfc092..05aa3e2f 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -150,7 +150,7 @@ function _doors.door_toggle(pos, node, clicker) replace_old_owner_information(pos) - if not default.can_interact_with_node(clicker, pos) then + if clicker and not default.can_interact_with_node(clicker, pos) then return false end @@ -530,7 +530,7 @@ function _doors.trapdoor_toggle(pos, node, clicker) replace_old_owner_information(pos) - if not default.can_interact_with_node(clicker, pos) then + if clicker and not default.can_interact_with_node(clicker, pos) then return false end