From: Perttu Ahola Date: Thu, 17 Nov 2011 14:50:06 +0000 (+0200) Subject: Fix tool wear X-Git-Tag: 0.4.dev-20111201-0~116 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0e64406b06961fc988cbb34a8eae4db98c7fb8b6;p=oweals%2Fminetest.git Fix tool wear --- diff --git a/src/materials.cpp b/src/materials.cpp index 5c89eafd8..ed0b00925 100644 --- a/src/materials.cpp +++ b/src/materials.cpp @@ -76,7 +76,7 @@ DiggingProperties getDiggingProperties(u16 content, ToolDiggingProperties *tp, durability = 1; float wear = 1.0 / durability; - u16 wear_i = wear/65535.; + u16 wear_i = 65535.*wear; return DiggingProperties(true, time, wear_i); }