# HG changeset patch # User nemo # Date 1350583464 14400 # Node ID d1ea9b3f543e6c19c9ab6af905a114c9c633cb87 # Parent 98edc0724a287992c2275ecce4ba6bc1991a7e28 damn nots diff -r 98edc0724a28 -r d1ea9b3f543e hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Wed Oct 17 23:50:28 2012 +0400 +++ b/hedgewars/GSHandlers.inc Thu Oct 18 14:04:24 2012 -0400 @@ -5294,8 +5294,8 @@ else if GameTicks and $3F = 0 then begin if (TestCollisionYwithGear(Gear, -1) = 0) - and not TestCollisionXwithGear(Gear, 1) - and not TestCollisionXwithGear(Gear, -1) + and (not TestCollisionXwithGear(Gear, 1)) + and (not TestCollisionXwithGear(Gear, -1)) and (TestCollisionYwithGear(Gear, 1) = 0) then Gear^.State:= Gear^.State and (not gstCollision) or gstMoving; end end; diff -r 98edc0724a28 -r d1ea9b3f543e hedgewars/uCollisions.pas --- 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; diff -r 98edc0724a28 -r d1ea9b3f543e hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Oct 17 23:50:28 2012 +0400 +++ b/hedgewars/uGears.pas Thu Oct 18 14:04:24 2012 -0400 @@ -652,7 +652,7 @@ snowRight:= max(LAND_WIDTH,4096)+512; snowLeft:= -(snowRight-LAND_WIDTH); -if not hasBorder and ((Theme = 'Snow') or (Theme = 'Christmas')) then +if (not hasBorder) and ((Theme = 'Snow') or (Theme = 'Christmas')) then for i:= vobCount * Longword(max(LAND_WIDTH,4096)) div 2048 downto 1 do AddGear(LongInt(GetRandom(snowRight - snowLeft)) + snowLeft, LongInt(LAND_HEIGHT + GetRandom(750)) - 1300, gtFlake, 0, _0, _0, 0); end; @@ -699,7 +699,7 @@ t^.dX:= t^.dX + Gear^.dX * dmg * _0_01 + SignAs(cHHKick, Gear^.dX); t^.dY:= t^.dY + Gear^.dY * dmg * _0_01; t^.State:= t^.State or gstMoving; - if t^.Kind = gtKnife then t^.State:= t^.State and not gstCollision; + if t^.Kind = gtKnife then t^.State:= t^.State and (not gstCollision); t^.Active:= true; FollowGear:= t end @@ -830,7 +830,7 @@ Gear^.Active:= true; DeleteCI(Gear); Gear^.State:= Gear^.State or gstMoving; - if Gear^.Kind = gtKnife then Gear^.State:= Gear^.State and not gstCollision; + if Gear^.Kind = gtKnife then Gear^.State:= Gear^.State and (not gstCollision); // move the gear upwards a bit to throw it over tiny obstacles at start if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then begin diff -r 98edc0724a28 -r d1ea9b3f543e hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Wed Oct 17 23:50:28 2012 +0400 +++ b/hedgewars/uGearsUtils.pas Thu Oct 18 14:04:24 2012 -0400 @@ -131,7 +131,7 @@ Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, tdY)/(Gear^.Density/_3); Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser); - if Gear^.Kind = gtKnife then Gear^.State:= Gear^.State and not gstCollision; + if Gear^.Kind = gtKnife then Gear^.State:= Gear^.State and (not gstCollision); if not Gear^.Invulnerable then Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner); Gear^.Active:= true;