# HG changeset patch # User nemo # Date 1547069277 18000 # Node ID e0af4ce7d8bcc1ca59210ce937aac06b61b0cf24 # Parent ec0afe1c6024d9e86e1d558950009e0c7320c99b fix incorrect mask set in r7b4643ff60ea - this causes ghost hog collisions and odd hog jumps on overlap with active hog diff -r ec0afe1c6024 -r e0af4ce7d8bc hedgewars/uCollisions.pas --- a/hedgewars/uCollisions.pas Wed Jan 09 19:39:48 2019 +0100 +++ b/hedgewars/uCollisions.pas Wed Jan 09 16:27:57 2019 -0500 @@ -501,7 +501,7 @@ begin if Land[y, x] and Gear^.CollisionMask <> 0 then begin - if ((Land[y, x] and Gear^.CollisionMask) and lfNotObjMask) <> 0 then + if ((Land[y, x] and Gear^.CollisionMask) and lfLandMask) <> 0 then exit(Land[y, x] and Gear^.CollisionMask) else pixel:= Land[y, x] and Gear^.CollisionMask; @@ -567,7 +567,7 @@ if (x and LAND_WIDTH_MASK) = 0 then if Land[y, x] > 0 then begin - if ((Land[y, x] and Gear^.CollisionMask) and lfNotObjMask) <> 0 then + if ((Land[y, x] and Gear^.CollisionMask) and lfLandMask) <> 0 then exit(Land[y, x] and Gear^.CollisionMask) else // if Land[y, x] <> 0 then pixel:= Land[y, x] and Gear^.CollisionMask; @@ -642,7 +642,7 @@ i:= y + Gear^.Radius * 2 - 2; repeat if (y and LAND_HEIGHT_MASK) = 0 then - if ((Land[y, x] and Gear^.CollisionMask) and lfNotObjMask) <> 0 then + if ((Land[y, x] and Gear^.CollisionMask) and lfLandMask) <> 0 then exit(Land[y, x] and Gear^.CollisionMask); inc(y) until (y > i); @@ -665,7 +665,7 @@ i:= x + Gear^.Radius * 2 - 2; repeat if (x and LAND_WIDTH_MASK) = 0 then - if ((Land[y, x] and Gear^.CollisionMask) and lfNotObjMask) <> 0 then + if ((Land[y, x] and Gear^.CollisionMask) and lfLandMask) <> 0 then exit(Land[y, x] and Gear^.CollisionMask); inc(x) until (x > i); @@ -981,7 +981,7 @@ i:= x + Gear^.Radius * 2 - 2; repeat if (x and LAND_WIDTH_MASK) = 0 then - if (Land[y, x] and lfNotObjMask) <> 0 then + if (Land[y, x] and lfLandMask) <> 0 then if (not isColl) or (abs(x-gx) < abs(collX-gx)) then begin isColl:= true;