aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorDS-Minetest <vorunbekannt75@web.de>2019-06-29 16:17:00 +0200
committersfan5 <sfan5@live.de>2019-07-08 14:21:27 +0200
commit140aeabd877bad674971ce5b9a43b59f888e511e (patch)
tree852078e34ffc1c617408e2ae1ac31143f552fb64 /src/client
parent0971a14a57c373330b04d355689553f6ddfa6bcb (diff)
downloadminetest-140aeabd877bad674971ce5b9a43b59f888e511e.tar.gz
minetest-140aeabd877bad674971ce5b9a43b59f888e511e.tar.bz2
minetest-140aeabd877bad674971ce5b9a43b59f888e511e.zip
Do predict when sneak-place to node with on_rightclick
Diffstat (limited to 'src/client')
-rw-r--r--src/client/game.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index a29b35746..a00e61e1d 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -3322,7 +3322,8 @@ bool Game::nodePlacementPrediction(const ItemDefinition &playeritem_def,
if (!is_valid_position)
return false;
- if (!prediction.empty() && !nodedef->get(node).rightclickable) {
+ if (!prediction.empty() && !(nodedef->get(node).rightclickable &&
+ !isKeyDown(KeyType::SNEAK))) {
verbosestream << "Node placement prediction for "
<< playeritem_def.name << " is "
<< prediction << std::endl;