diff options
-rw-r--r-- | src/tool.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tool.cpp b/src/tool.cpp index 2d2f9dee5..7128f1915 100644 --- a/src/tool.cpp +++ b/src/tool.cpp @@ -200,11 +200,12 @@ DigParams getDigParams(const ItemGroupList &groups, int rating = itemgroup_get(groups, name); float time = 0; bool time_exists = cap.getTime(rating, &time); + int leveldiff = cap.maxlevel - level; + time /= MYMAX(1, leveldiff); if(!result_diggable || time < result_time){ if(cap.maxlevel >= level && time_exists){ result_diggable = true; - int leveldiff = cap.maxlevel - level; - result_time = time / MYMAX(1, leveldiff); + result_time = time; if(cap.uses != 0) result_wear = 1.0 / cap.uses / pow(3.0, (double)leveldiff); else |