From: PilzAdam Date: Thu, 13 Jun 2013 12:41:23 +0000 (+0000) Subject: Reset dig_time when switching to a tool that cant dig the current node X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=7a58c1d4ca7a59f05043ff3c2caeab16c0a78a0d;p=zefram%2Fminetest%2Fminetest_engine.git Reset dig_time when switching to a tool that cant dig the current node --- diff --git a/src/game.cpp b/src/game.cpp index cbb0d918..30d9c7fa 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 }