forked from Mirrorlandia_minetest/minetest
Dont call on_rightclick() if sneak is pressed
This commit is contained in:
parent
c1fee78e85
commit
28f5b55643
@ -232,7 +232,8 @@ end
|
|||||||
|
|
||||||
function minetest.item_place(itemstack, placer, pointed_thing)
|
function minetest.item_place(itemstack, placer, pointed_thing)
|
||||||
-- Call on_rightclick if the pointed node defines it
|
-- 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 n = minetest.env:get_node(pointed_thing.under)
|
||||||
local nn = n.name
|
local nn = n.name
|
||||||
if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].on_rightclick then
|
if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].on_rightclick then
|
||||||
|
Loading…
Reference in New Issue
Block a user