diff options
author | Jeija <norrepli@gmail.com> | 2013-01-26 23:15:23 +0100 |
---|---|---|
committer | Ilya Zhuravlev <zhuravlevilya@ya.ru> | 2013-01-28 00:44:42 +0400 |
commit | c1fee78e85f52e3b5c18bf2b2f56bc6926597868 (patch) | |
tree | 5d71d2f55da3cfea4e7409281d66fd1389fd5430 | |
parent | d6f0bf9eef30819d91f89f2181ac5278d238f1a9 (diff) | |
download | minetest-c1fee78e85f52e3b5c18bf2b2f56bc6926597868.tar.gz minetest-c1fee78e85f52e3b5c18bf2b2f56bc6926597868.tar.bz2 minetest-c1fee78e85f52e3b5c18bf2b2f56bc6926597868.zip |
Place block when holding sneak while right-clicking nodes with formspec
-rw-r--r-- | src/game.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index 588a0fef3..e923cbbb0 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2482,7 +2482,9 @@ void the_game( // Sign special case, at least until formspec is properly implemented. // Deprecated? - if(meta && meta->getString("formspec") == "hack:sign_text_input" && !random_input) + if(meta && meta->getString("formspec") == "hack:sign_text_input" + && !random_input + && !input->isKeyDown(getKeySetting("keymap_sneak"))) { infostream<<"Launching metadata text input"<<std::endl; @@ -2497,7 +2499,8 @@ void the_game( wtext))->drop(); } // If metadata provides an inventory view, activate it - else if(meta && meta->getString("formspec") != "" && !random_input) + else if(meta && meta->getString("formspec") != "" && !random_input + && !input->isKeyDown(getKeySetting("keymap_sneak"))) { infostream<<"Launching custom inventory view"<<std::endl; |