oops
authornemo
Sat, 04 Aug 2012 21:49:24 -0400
changeset 7486 f3a13da9fa4e
parent 7483 d479b98d38f7
child 7489 43a998fbacfe
oops
hedgewars/uAIAmmoTests.pas
--- a/hedgewars/uAIAmmoTests.pas	Sat Aug 04 21:36:31 2012 -0400
+++ b/hedgewars/uAIAmmoTests.pas	Sat Aug 04 21:49:24 2012 -0400
@@ -876,11 +876,12 @@
         exit(BadTurn);
         
     valueResult:= 0;
+    v:= 0;
 
     x:= hwFloat2Float(Me^.X);
     y:= hwFloat2Float(Me^.Y);
     d:= sqrt(sqr(Targ.X - x) + sqr(Targ.Y - y));
-    if d = 0 then
+    if d < 10 then
         begin
         dx:= 0;
         dy:= 8;
@@ -909,13 +910,12 @@
         end;
     if dx = 0 then
         begin
-        v:= 0;
         x:= hwFloat2Float(Me^.X);
         y:= hwFloat2Float(Me^.Y);
         tx:= trunc(x);
-        RateShove(Me, tx, trunc(y)
-            , 30, 30, 25
-            , -cx, -0.9, trackFall);
+        v:= RateShove(Me, tx, trunc(y)
+                , 30, 30, 25
+                , -cx, -0.9, trackFall);
         for i:= 1 to 512 div step - 2 do
             begin
             y:= y + dy;