hedgewars/uAIAmmoTests.pas
changeset 7424 fe0f07667f24
parent 7416 2f2f78fc65a3
child 7427 48f9d53c844a
--- a/hedgewars/uAIAmmoTests.pas	Tue Jul 24 16:10:09 2012 +0400
+++ b/hedgewars/uAIAmmoTests.pas	Tue Jul 24 16:12:41 2012 +0400
@@ -709,10 +709,10 @@
     x:= hwRound(Me^.X);
     y:= hwRound(Me^.Y);
 
-    a:= 0;
+    a:= cMaxAngle div 2;
     valueResult:= 0;
 
-    while a <= cMaxAngle div 2 do
+    while a >= 0 do
         begin
         dx:= sin(a / cMaxAngle * pi) * 0.5;
         dy:= cos(a / cMaxAngle * pi) * 0.5;
@@ -736,7 +736,7 @@
                 valueResult:= v1
                 end;
 
-        a:= a + 15 + random(cMaxAngle div 16)
+        a:= a - 15 - random(cMaxAngle div 16)
         end;
    
     if valueResult <= 0 then