Small fix in getHitParams
authorPerttu Ahola <celeron55@gmail.com>
Sun, 4 Mar 2012 14:29:04 +0000 (16:29 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Sat, 10 Mar 2012 09:28:13 +0000 (11:28 +0200)
src/tool.cpp

index 38994c620363f7382aae2ce41cc6b80b29b4e674..da7ee73dc5124fc2d05e810c05eaa1bea57ec34a 100644 (file)
@@ -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)