projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e997e9
)
Allow placing auto-rotating nodes on other nodes in on_rightclick (#9859)
author
Yaman Qalieh
<ybq987@gmail.com>
Wed, 13 May 2020 11:57:05 +0000
(07:57 -0400)
committer
GitHub
<noreply@github.com>
Wed, 13 May 2020 11:57:05 +0000
(13:57 +0200)
builtin/common/misc_helpers.lua
patch
|
blob
|
history
diff --git
a/builtin/common/misc_helpers.lua
b/builtin/common/misc_helpers.lua
index 715f89bc4b9424284be547ed3df31351d5a05f44..1a0c71efd348b2766ec46cf8177fa3a2de66be66 100644
(file)
--- 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