Pressure plates : don't crash if using older doors API

master
Jean-Patrick Guerrero 2016-02-27 23:49:01 +01:00
parent df7bfb9f2e
commit 8ac2c14861
1 changed files with 2 additions and 2 deletions

View File

@ -20,8 +20,8 @@ function plate.door_toggle(pos_plate, pos_door, player)
end
function plate.timer(pos)
local objs = minetest.get_objects_inside_radius(pos, 0.6)
if objs == {} then return true end
local objs = minetest.get_objects_inside_radius(pos, 0.8)
if objs == {} or not doors.get then return true end
local minp = {x=pos.x-2, y=pos.y, z=pos.z-2}
local maxp = {x=pos.x+2, y=pos.y, z=pos.z+2}
local doors = minetest.find_nodes_in_area(minp, maxp, "group:door")