Fix tool wear
authorPerttu Ahola <celeron55@gmail.com>
Thu, 17 Nov 2011 14:50:06 +0000 (16:50 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:49 +0000 (19:13 +0200)
src/materials.cpp

index 5c89eafd8b9eba5343c891703e6f31e5d1270861..ed0b00925ef5edfd2911aa70a8ba0ef45f8662c7 100644 (file)
@@ -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);
 }