From 0e64406b06961fc988cbb34a8eae4db98c7fb8b6 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 17 Nov 2011 16:50:06 +0200 Subject: [PATCH] Fix tool wear --- src/materials.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }