X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftool.cpp;h=e013d5ea8ad63892b988744dc1855ffcc5982afc;hb=7289d61e99625b46eb2c4d6b90a2a5de42f207e6;hp=f3b3e656f8766d546e7d90a1d0abf758baa5bb57;hpb=4e1f50035e860a00636ca5d804c267119df99601;p=minetest.git 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::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; }