hedgewars/uGearsUtils.pas
changeset 7625 5c0ad64afc8d
parent 7614 3ae60c8a15f2
child 7627 e1e112687fd6
--- a/hedgewars/uGearsUtils.pas	Wed Aug 29 10:56:32 2012 -0400
+++ b/hedgewars/uGearsUtils.pas	Wed Aug 29 11:48:10 2012 -0400
@@ -108,7 +108,7 @@
 // Run the calcs only once we know we have a type that will need damage
                         tdX:= Gear^.X-fX;
                         tdY:= Gear^.Y-fY;
-                        if hwRound(hwAbs(tdX)+hwAbs(tdY)) < dmgBase then
+                        if (tdX.Round + tdY.Round + 2) < dmgBase then
                             dmg:= dmgBase - hwRound(Distance(tdX, tdY));
                         if dmg > 1 then
                             begin