hedgewars/uCollisions.pas
changeset 7767 d1ea9b3f543e
parent 7756 b89bd0ffb8aa
child 8744 6c87486fd89b
--- a/hedgewars/uCollisions.pas	Wed Oct 17 23:50:28 2012 +0400
+++ b/hedgewars/uCollisions.pas	Thu Oct 18 14:04:24 2012 -0400
@@ -249,7 +249,7 @@
                         dX:= Gear^.dX;
                         dY:= Gear^.dY * _0_5;
                         State:= State or gstMoving;
-                        if Kind = gtKnife then State:= State and not gstCollision;
+                        if Kind = gtKnife then State:= State and (not gstCollision);
                         Active:= true
                         end;
                     DeleteCI(cGear);
@@ -312,7 +312,7 @@
                             dX:= Gear^.dX * _0_5;
                         dY:= Gear^.dY;
                         State:= State or gstMoving;
-                        if Kind = gtKnife then State:= State and not gstCollision;
+                        if Kind = gtKnife then State:= State and (not gstCollision);
                         Active:= true
                         end;
                     DeleteCI(cGear);
@@ -603,7 +603,7 @@
         repeat
         if (x and LAND_WIDTH_MASK) = 0 then
             if Land[y, x] <> 0 then
-                if not isColl or (abs(x-gx) < abs(collX-gx)) then
+                if (not isColl) or (abs(x-gx) < abs(collX-gx)) then
                     begin
                     isColl:= true;
                     collX := x;
@@ -626,7 +626,7 @@
         repeat
         if (y and LAND_HEIGHT_MASK) = 0 then
             if Land[y, x] <> 0 then
-                if not isColl or (abs(y-gy) < abs(collY-gy)) then
+                if (not isColl) or (abs(y-gy) < abs(collY-gy)) then
                     begin
                     isColl:= true;
                     collY := y;
@@ -695,7 +695,7 @@
     repeat
     if (x and LAND_WIDTH_MASK) = 0 then
         if Land[y, x] > 255 then
-            if not isColl or (abs(x-gx) < abs(collX-gx)) then
+            if (not isColl) or (abs(x-gx) < abs(collX-gx)) then
                 begin
                 isColl:= true;
                 collX := x;