From: Perttu Ahola Date: Thu, 17 Nov 2011 14:50:06 +0000 (+0200) Subject: Fix tool wear X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=0e64406b06961fc988cbb34a8eae4db98c7fb8b6;p=zefram%2Fminetest%2Fminetest_engine.git Fix tool wear --- diff --git a/src/materials.cpp b/src/materials.cpp index 5c89eafd..ed0b0092 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); }