projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1fee78
)
Dont call on_rightclick() if sneak is pressed
author
PilzAdam
<PilzAdam@gmx.de>
Sun, 27 Jan 2013 20:58:46 +0000
(21:58 +0100)
committer
PilzAdam
<PilzAdam@gmx.de>
Sun, 27 Jan 2013 20:58:46 +0000
(21:58 +0100)
builtin/item.lua
patch
|
blob
|
history
diff --git
a/builtin/item.lua
b/builtin/item.lua
index d36e8a758b41e610ffd1d06dfb4a422ce85456a5..a28798d4d3a21be5f5736dede4d875fd3cd72b81 100644
(file)
--- a/
builtin/item.lua
+++ b/
builtin/item.lua
@@
-232,7
+232,8
@@
end
function minetest.item_place(itemstack, placer, pointed_thing)
-- Call on_rightclick if the pointed node defines it
- if pointed_thing.type == "node" then
+ if pointed_thing.type == "node" and placer and
+ not placer:get_player_control().sneak then
local n = minetest.env:get_node(pointed_thing.under)
local nn = n.name
if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].on_rightclick then