summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-06-13 12:41:23 +0000
committerPilzAdam <pilzadam@minetest.net>2013-06-13 13:34:48 +0000
commit7a58c1d4ca7a59f05043ff3c2caeab16c0a78a0d (patch)
treebad1f4cef98ba6e92bcd8997a619e9fc24c86b63 /src
parent21d6b39fd734af632aa4847935ac5f2a4ad6dc61 (diff)
downloadminetest-7a58c1d4ca7a59f05043ff3c2caeab16c0a78a0d.tar.gz
minetest-7a58c1d4ca7a59f05043ff3c2caeab16c0a78a0d.tar.bz2
minetest-7a58c1d4ca7a59f05043ff3c2caeab16c0a78a0d.zip
Reset dig_time when switching to a tool that cant dig the current node
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index cbb0d9183..30d9c7faf 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -2706,7 +2706,12 @@ void the_game(
gamedef->event()->put(e);
}
- dig_time += dtime;
+ if(dig_time_complete < 100000.0)
+ dig_time += dtime;
+ else {
+ dig_time = 0;
+ client.setCrack(-1, nodepos);
+ }
camera.setDigging(0); // left click animation
}