hedgewars/uAIMisc.pas
changeset 9706 5178d2263521
parent 9137 d987230b85ed
child 9950 2759212a27de
child 9998 736015b847e3
--- a/hedgewars/uAIMisc.pas	Mon Nov 18 22:14:16 2013 +0100
+++ b/hedgewars/uAIMisc.pas	Tue Nov 19 22:15:40 2013 -0500
@@ -812,13 +812,13 @@
     jmpLJump:
         begin
             if TestCollisionYwithGear(Gear, -1) <> 0 then
-                if not TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) then
+                if TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX)) = 0 then
                     Gear^.Y:= Gear^.Y - int2hwFloat(2)
                 else
-                    if not TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) then
+                    if TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX)) = 0 then
                         Gear^.Y:= Gear^.Y - _1;
-            if not (TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) or
-               (TestCollisionYwithGear(Gear, -1) <> 0)) then
+            if (TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) = 0) and
+               (TestCollisionYwithGear(Gear, -1) = 0) then
             begin
                 Gear^.dY:= -_0_15;
                 Gear^.dX:= SignAs(_0_15, Gear^.dX);
@@ -846,7 +846,7 @@
                 Gear^.dY:= -_0_25;
                 Gear^.dX:= SignAs(_0_02, Gear^.dX)
             end;
-        if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then SetLittle(Gear^.dX);
+        if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) <> 0 then SetLittle(Gear^.dX);
             Gear^.X:= Gear^.X + Gear^.dX;
         inc(GoInfo.Ticks);
         Gear^.dY:= Gear^.dY + cGravity;