From: Novatux Date: Wed, 2 Jul 2014 14:48:11 +0000 (+0200) Subject: Fix inversion of full_punch_interval X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=3d6d66b181b894180164aa34aab7b2029bef1bf4;p=zefram%2Fminetest%2Fminetest_engine.git Fix inversion of full_punch_interval --- diff --git a/src/tool.cpp b/src/tool.cpp index f3b3e656..e013d5ea 100644 --- a/src/tool.cpp +++ b/src/tool.cpp @@ -166,7 +166,7 @@ HitParams getHitParams(const ItemGroupList &armor_groups, for(std::map::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; }