aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNovatux <nathanael.courant@laposte.net>2014-07-02 16:48:11 +0200
committerNovatux <nathanael.courant@laposte.net>2014-07-02 16:48:11 +0200
commit3d6d66b181b894180164aa34aab7b2029bef1bf4 (patch)
treec91ea9b2a2cbad2fffb46892be12845c74b55805
parent567dea29ee44fdcf1f25e431273aafdc6db721e2 (diff)
downloadminetest-3d6d66b181b894180164aa34aab7b2029bef1bf4.tar.gz
minetest-3d6d66b181b894180164aa34aab7b2029bef1bf4.tar.bz2
minetest-3d6d66b181b894180164aa34aab7b2029bef1bf4.zip
Fix inversion of full_punch_interval
-rw-r--r--src/tool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool.cpp b/src/tool.cpp
index f3b3e656f..e013d5ea8 100644
--- a/src/tool.cpp
+++ b/src/tool.cpp
@@ -166,7 +166,7 @@ HitParams getHitParams(const ItemGroupList &armor_groups,
for(std::map<std::string, s16>::const_iterator
i = tp->damageGroups.begin(); i != tp->damageGroups.end(); i++){
s16 armor = itemgroup_get(armor_groups, i->first);
- damage += i->second * rangelim(time_from_last_punch * full_punch_interval, 0.0, 1.0)
+ damage += i->second * rangelim(time_from_last_punch / full_punch_interval, 0.0, 1.0)
* armor / 100.0;
}