summaryrefslogtreecommitdiff
path: root/src/tool.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-04 16:29:04 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-10 11:28:13 +0200
commitf1cb91cd931bed056bdbe37938d141e2ea068b89 (patch)
treed43e87358399c8e3a3792029a0c2eaab398f5300 /src/tool.cpp
parent910186905f7e0344a70357b9efd3a7bc57773c90 (diff)
downloadminetest-f1cb91cd931bed056bdbe37938d141e2ea068b89.tar.gz
minetest-f1cb91cd931bed056bdbe37938d141e2ea068b89.tar.bz2
minetest-f1cb91cd931bed056bdbe37938d141e2ea068b89.zip
Small fix in getHitParams
Diffstat (limited to 'src/tool.cpp')
-rw-r--r--src/tool.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tool.cpp b/src/tool.cpp
index 38994c620..da7ee73dc 100644
--- a/src/tool.cpp
+++ b/src/tool.cpp
@@ -135,6 +135,8 @@ HitParams getHitParams(const ItemGroupList &groups,
DigParams digprop = getDigParams(groups, tp,
time_from_last_punch);
+ if(time_from_last_punch > tp->full_punch_interval)
+ time_from_last_punch = tp->full_punch_interval;
// Damage in hp is equivalent to nodes dug in time_from_last_punch
s16 hp = 0;
if(digprop.diggable)