hedgewars/uGearsUtils.pas
changeset 7721 2b1ad418ba39
parent 7719 eeae1cb6b6bf
child 7754 e81dc9bef8b8
--- a/hedgewars/uGearsUtils.pas	Mon Oct 01 00:31:38 2012 +0400
+++ b/hedgewars/uGearsUtils.pas	Mon Oct 01 12:01:39 2012 +0400
@@ -110,7 +110,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 (tdX.Round + tdY.Round + 2) < dmgBase then
+                        if LongInt(tdX.Round + tdY.Round + 2) < dmgBase then
                             dmg:= dmgBase - hwRound(Distance(tdX, tdY));
                         if dmg > 1 then
                             begin
@@ -144,7 +144,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 (tdX.Round + tdY.Round + 2) < dmgBase then
+                        if LongInt(tdX.Round + tdY.Round + 2) < dmgBase then
                             dmg:= dmgBase - hwRound(Distance(tdX, tdY));
                         if dmg > 1 then
                             begin