aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2017-08-10 09:41:56 +0200
committerparamat <mat.gregory@virginmedia.com>2017-08-13 21:37:30 +0100
commit4381fe0a0a0921e6ba79c072045be2dc04be646a (patch)
tree9c88996d20c6da156f87c3f193a8c358597ec5e6 /src
parentfa7fe405095cbcdcdca3cf953a036bfd85d5b21d (diff)
downloadminetest-4381fe0a0a0921e6ba79c072045be2dc04be646a.tar.gz
minetest-4381fe0a0a0921e6ba79c072045be2dc04be646a.tar.bz2
minetest-4381fe0a0a0921e6ba79c072045be2dc04be646a.zip
Trigger on_rightclick regardless on the formspec meta field
Document behaviour for older clients.
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index e34a02693..4588e21e0 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -3799,6 +3799,11 @@ void Game::handlePointingAtNode(const PointedThing &pointed,
if (meta && meta->getString("formspec") != "" && !random_input
&& !isKeyDown(KeyType::SNEAK)) {
+ // Report right click to server
+ if (nodedef_manager->get(map.getNodeNoEx(nodepos)).rightclickable) {
+ client->interact(3, pointed);
+ }
+
infostream << "Launching custom inventory view" << std::endl;
InventoryLocation inventoryloc;