Skip to content
Snippets Groups Projects
Commit 28f5b556 authored by PilzAdam's avatar PilzAdam
Browse files

Dont call on_rightclick() if sneak is pressed

parent c1fee78e
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment