hedgewars/uAIMisc.pas
branchwebgl
changeset 9950 2759212a27de
parent 9160 fc46e75f6b72
parent 9706 5178d2263521
child 10015 4feced261c68
--- a/hedgewars/uAIMisc.pas	Fri Oct 11 17:43:13 2013 +0200
+++ b/hedgewars/uAIMisc.pas	Sat Jan 04 23:55:54 2014 +0400
@@ -816,13 +816,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);
@@ -850,7 +850,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;