diff options
author | Yaman Qalieh <ybq987@gmail.com> | 2020-05-13 07:57:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 13:57:05 +0200 |
commit | 6c607e20828f97f950038dfb86891a74afb6f755 (patch) | |
tree | abc48fa7a588d3b24e045b61cdadabeabf28575b /builtin/common/misc_helpers.lua | |
parent | 4e997e9d047068bfccd30fb700e2b3b9f48fda4c (diff) | |
download | minetest-6c607e20828f97f950038dfb86891a74afb6f755.tar.gz minetest-6c607e20828f97f950038dfb86891a74afb6f755.tar.bz2 minetest-6c607e20828f97f950038dfb86891a74afb6f755.zip |
Allow placing auto-rotating nodes on other nodes in on_rightclick (#9859)
Diffstat (limited to 'builtin/common/misc_helpers.lua')
-rw-r--r-- | builtin/common/misc_helpers.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua index 715f89bc4..1a0c71efd 100644 --- a/builtin/common/misc_helpers.lua +++ b/builtin/common/misc_helpers.lua @@ -290,7 +290,8 @@ if INIT == "game" then return end local undef = core.registered_nodes[unode.name] - if undef and undef.on_rightclick then + local sneaking = placer and placer:get_player_control().sneak + if undef and undef.on_rightclick and not sneaking then return undef.on_rightclick(pointed_thing.under, unode, placer, itemstack, pointed_thing) end |