--- a/hedgewars/uAIAmmoTests.pas Thu Nov 18 09:12:27 2010 +0300
+++ b/hedgewars/uAIAmmoTests.pas Thu Nov 18 11:32:47 2010 +0300
@@ -108,7 +108,7 @@
const BadTurn = Low(LongInt) div 4;
implementation
-uses uMisc, uAIMisc, uVariables;
+uses uAIMisc, uVariables, uUtils;
function Metric(x1, y1, x2, y2: LongInt): LongInt;
begin
@@ -539,7 +539,7 @@
or (y.Round > LongWord(LAND_HEIGHT))
or (d > 200);
-if Abs(Targ.X - hwRound(x)) + Abs(Targ.Y - hwRound(y)) < 3 then valueResult:= max(0, (4 - d div 50) * 7 * 1024)
+if Abs(Targ.X - hwRound(x)) + Abs(Targ.Y - hwRound(y)) < 3 then valueResult:= Max(0, (4 - d div 50) * 7 * 1024)
else valueResult:= BadTurn;
TestDesertEagle:= valueResult
end;