]> git.lizzy.rs Git - minetest.git/commitdiff
Fix inversion of full_punch_interval
authorNovatux <nathanael.courant@laposte.net>
Wed, 2 Jul 2014 14:48:11 +0000 (16:48 +0200)
committerNovatux <nathanael.courant@laposte.net>
Wed, 2 Jul 2014 14:48:11 +0000 (16:48 +0200)
src/tool.cpp

index f3b3e656f8766d546e7d90a1d0abf758baa5bb57..e013d5ea8ad63892b988744dc1855ffcc5982afc 100644 (file)
@@ -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;
        }