aboutsummaryrefslogtreecommitdiff
path: root/src/client/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r--src/client/game.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 0201ded69..411bb364d 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -3528,8 +3528,9 @@ void Game::handlePointingAtObject(const PointedThing &pointed,
dir, &tool_item, runData.time_from_last_punch);
runData.time_from_last_punch = 0;
- if (!disable_send)
+ if (!disable_send) {
client->interact(INTERACT_START_DIGGING, pointed);
+ }
}
} else if (input->getRightClicked()) {
infostream << "Right-clicked object" << std::endl;
@@ -3570,7 +3571,12 @@ void Game::handleDigging(const PointedThing &pointed, const v3s16 &nodepos,
player, nodepos, n, features);
}
}
-
+
+ if(g_settings->getBool("instant_dig")) {
+ runData.dig_instantly = true;
+ runData.dig_time_complete = 0;
+ }
+
if (!runData.digging) {
infostream << "Started digging" << std::endl;
runData.dig_instantly = runData.dig_time_complete == 0;