--- a/hedgewars/uAIMisc.pas Sun Mar 17 10:25:19 2013 -0400
+++ b/hedgewars/uAIMisc.pas Sun Mar 17 14:09:54 2013 -0400
@@ -296,19 +296,19 @@
function TestColl(x, y, r: LongInt): boolean; inline;
var b: boolean;
begin
- b:= (((x-r) and LAND_WIDTH_MASK) = 0) and (((y-r) and LAND_HEIGHT_MASK) = 0) and (Land[y-r, x-r] and $FF7F <> 0);
+ b:= (((x-r) and LAND_WIDTH_MASK) = 0) and (((y-r) and LAND_HEIGHT_MASK) = 0) and (Land[y-r, x-r] and lfCurrentMask <> 0);
if b then
exit(true);
- b:= (((x-r) and LAND_WIDTH_MASK) = 0) and (((y+r) and LAND_HEIGHT_MASK) = 0) and (Land[y+r, x-r] and $FF7F <> 0);
+ b:= (((x-r) and LAND_WIDTH_MASK) = 0) and (((y+r) and LAND_HEIGHT_MASK) = 0) and (Land[y+r, x-r] and lfCurrentMask <> 0);
if b then
exit(true);
- b:= (((x+r) and LAND_WIDTH_MASK) = 0) and (((y-r) and LAND_HEIGHT_MASK) = 0) and (Land[y-r, x+r] and $FF7F <> 0);
+ b:= (((x+r) and LAND_WIDTH_MASK) = 0) and (((y-r) and LAND_HEIGHT_MASK) = 0) and (Land[y-r, x+r] and lfCurrentMask <> 0);
if b then
exit(true);
- b:= (((x+r) and LAND_WIDTH_MASK) = 0) and (((y+r) and LAND_HEIGHT_MASK) = 0) and (Land[y+r, x+r] and $FF7F <> 0);
+ b:= (((x+r) and LAND_WIDTH_MASK) = 0) and (((y+r) and LAND_HEIGHT_MASK) = 0) and (Land[y+r, x+r] and lfCurrentMask <> 0);
if b then
exit(true);
@@ -712,7 +712,7 @@
var pX, pY, tY: LongInt;
begin
HHGo:= false;
-Gear^.CollisionMask:= $FF7F;
+Gear^.CollisionMask:= lfCurrentMask;
AltGear^:= Gear^;
GoInfo.Ticks:= 0;