Fix warning on undeclared global variable

This commit is contained in:
Sys Quatre 2020-07-21 17:43:32 +02:00
parent ca94c8d43e
commit bd6909326c

View File

@ -157,12 +157,11 @@ minetest.register_node("locks:door", {
local fdir = 0 local fdir = 0
local placer_pos = placer:get_pos() local placer_pos = placer:get_pos()
if placer_pos then if placer_pos then
dir = { fdir = minetest.dir_to_facedir({
x = above.x - placer_pos.x, x = above.x - placer_pos.x,
y = above.y - placer_pos.y, y = above.y - placer_pos.y,
z = above.z - placer_pos.z z = above.z - placer_pos.z
} })
fdir = minetest.dir_to_facedir(dir)
end end
local t = 1 local t = 1