aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHybridDog <ovvv@web.de>2015-12-18 17:38:25 +0100
committerest31 <MTest31@outlook.com>2015-12-20 16:25:33 +0100
commit5755c9a43980930ba97fe7db56d3e0509a3e2d77 (patch)
tree8fa89b075e7eae321027ad06da8131155833e14b
parentb4eb614d31a6ed7935bfaa4090fa275a306a3aee (diff)
downloadminetest-5755c9a43980930ba97fe7db56d3e0509a3e2d77.tar.gz
minetest-5755c9a43980930ba97fe7db56d3e0509a3e2d77.tar.bz2
minetest-5755c9a43980930ba97fe7db56d3e0509a3e2d77.zip
Fix missing localization for obj
-rw-r--r--builtin/game/item.lua14
1 files changed, 3 insertions, 11 deletions
diff --git a/builtin/game/item.lua b/builtin/game/item.lua
index 6c2214ef6..d16601d30 100644
--- a/builtin/game/item.lua
+++ b/builtin/game/item.lua
@@ -27,19 +27,11 @@ function core.get_pointed_thing_position(pointed_thing, above)
if above then
-- The position where a node would be placed
return pointed_thing.above
- else
- -- The position where a node would be dug
- return pointed_thing.under
end
+ -- The position where a node would be dug
+ return pointed_thing.under
elseif pointed_thing.type == "object" then
- obj = pointed_thing.ref
- if obj ~= nil then
- return obj:getpos()
- else
- return nil
- end
- else
- return nil
+ return pointed_thing.ref and pointed_thing.ref:getpos()
end
end