summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2015-09-05 11:46:45 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2015-09-05 11:46:45 +0100
commite0febf0dca37aa935a6303b92eb30f102c0f62aa (patch)
treedb4ed056b0e2e2bbb933cc8228ab9a7aecd632f9
parentd069046c2ea1905237791b81b6e0a8f3ecb66d33 (diff)
Fixed positional bug
-rw-r--r--init.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index b279a24..02a4a45 100644
--- a/init.lua
+++ b/init.lua
@@ -184,10 +184,11 @@ function minetest.item_place(itemstack, placer, pointed_thing)
if itemstack:get_name() == "protector:protect"
or itemstack:get_name() == "protector:protect2" then
local user = placer:get_player_name()
- if not protector.can_dig(protector.radius * 2, pointed_thing.above, user, true, 3) then
+ local pos = pointed_thing.under
+ if not protector.can_dig(protector.radius * 2, pos, user, true, 3) then
minetest.chat_send_player(user,
"Overlaps into another protected area")
- return protector.old_node_place(itemstack, placer, pointed_thing.above)
+ return protector.old_node_place(itemstack, placer, pos)
end
end