hedgewars/uAIMisc.pas
changeset 6011 519f8a58c021
parent 5881 099464aab4b6
child 6081 537bbd5c1a62
--- a/hedgewars/uAIMisc.pas	Sat Sep 24 17:12:46 2011 +0200
+++ b/hedgewars/uAIMisc.pas	Sat Sep 24 22:16:49 2011 +0400
@@ -80,7 +80,7 @@
 
 procedure FillTargets;
 var i, t: Longword;
-    f, e: Longword;
+    f, e: LongInt;
 begin
 Targets.Count:= 0;
 f:= 0;
@@ -233,7 +233,7 @@
     with Targets.ar[i] do
          begin
          dmg:= hwRound(_0_01 * cDamageModifier
-            * min((r + cHHRadius div 2 - DistanceI(Point.x - x, Point.y - y).Round) div 2, r) * cDamagePercent);
+            * min((r + cHHRadius div 2 - LongInt(DistanceI(Point.x - x, Point.y - y).Round)) div 2, r) * cDamagePercent);
 
          if dmg > 0 then
             begin